From be93e56cf5c6bd5d3d4ca20beafb18d8c412ff2e Mon Sep 17 00:00:00 2001 From: cds-amal Date: Tue, 10 Mar 2026 18:17:30 -0400 Subject: [PATCH 1/5] feat(make): add self-documenting help target and modernize Makefile Add a 'make help' target with awk-based extraction of target descriptions. Also adds standalone 'fmt', 'clippy', 'stdlib-smir', 'build-info', and nightly administration targets. Uses the final Makefile structure: targets for golden file management, UI testing, and nightly lifecycle are included but depend on scripts added in later commits. --- Makefile | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/Makefile b/Makefile index 453f65ad..b6f37b14 100644 --- a/Makefile +++ b/Makefile @@ -57,21 +57,25 @@ ACTIVE_NIGHTLY := nightly-$(NIGHTLY_DATE) integration-test: TESTS ?= $(shell find $(TESTDIR) -type f -name "*.rs") integration-test: SMIR ?= cargo run -- "-Zno-codegen" # override this to tweak how expectations are formatted -integration-test: NORMALIZE ?= jq -S -e -f $(TESTDIR)/../normalise-filter.jq +integration-test: FILTER ?= $(TESTDIR)/../normalise-filter.jq # override this to re-make golden files integration-test: DIFF ?= | diff - ## Run integration tests against expected outputs integration-test: + @echo "Using golden files from: $(GOLDEN_DIR)" errors=""; \ report() { echo "$$1: $$2"; errors="$$errors\n$$1: $$2"; }; \ - for rust in ${TESTS}; do \ + for rust in $(TESTS); do \ target=$${rust%.rs}.smir.json; \ + receipts=$${target%.json}.receipts.json; \ + name=$$(basename $${rust%.rs}); \ dir=$$(dirname $${rust}); \ + expected="$(GOLDEN_DIR)/$${name}.smir.json.expected"; \ echo "$$rust"; \ - ${SMIR} --out-dir $${dir} $${rust} || report "$$rust" "Conversion failed"; \ + $(SMIR) --out-dir $${dir} $${rust} || report "$$rust" "Conversion failed"; \ [ -f $${target} ] \ - && ${NORMALIZE} $${target} ${DIFF} $${target}.expected \ - && rm $${target} \ + && jq -S -e --slurpfile receipts $${receipts} -f $(FILTER) $${target} $(DIFF) $${expected} \ + && rm -f $${target} $${receipts} \ || report "$$rust" "Unexpected json output"; \ done; \ [ -z "$$errors" ] || (echo "===============\nFAILING TESTS:$$errors"; exit 1) From 4b4732e521da7a8c5665acb41d6d4d71bf11fa17 Mon Sep 17 00:00:00 2001 From: cds-amal Date: Tue, 10 Mar 2026 20:12:42 -0400 Subject: [PATCH 2/5] fix(make): revert integration-test to flat golden files for PR 1 The receipt-driven integration-test target requires receipts (PR 2) and per-nightly golden directories (PR 3). Revert to master's flat-file version so CI passes on the foundation PR. --- Makefile | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/Makefile b/Makefile index b6f37b14..453f65ad 100644 --- a/Makefile +++ b/Makefile @@ -57,25 +57,21 @@ ACTIVE_NIGHTLY := nightly-$(NIGHTLY_DATE) integration-test: TESTS ?= $(shell find $(TESTDIR) -type f -name "*.rs") integration-test: SMIR ?= cargo run -- "-Zno-codegen" # override this to tweak how expectations are formatted -integration-test: FILTER ?= $(TESTDIR)/../normalise-filter.jq +integration-test: NORMALIZE ?= jq -S -e -f $(TESTDIR)/../normalise-filter.jq # override this to re-make golden files integration-test: DIFF ?= | diff - ## Run integration tests against expected outputs integration-test: - @echo "Using golden files from: $(GOLDEN_DIR)" errors=""; \ report() { echo "$$1: $$2"; errors="$$errors\n$$1: $$2"; }; \ - for rust in $(TESTS); do \ + for rust in ${TESTS}; do \ target=$${rust%.rs}.smir.json; \ - receipts=$${target%.json}.receipts.json; \ - name=$$(basename $${rust%.rs}); \ dir=$$(dirname $${rust}); \ - expected="$(GOLDEN_DIR)/$${name}.smir.json.expected"; \ echo "$$rust"; \ - $(SMIR) --out-dir $${dir} $${rust} || report "$$rust" "Conversion failed"; \ + ${SMIR} --out-dir $${dir} $${rust} || report "$$rust" "Conversion failed"; \ [ -f $${target} ] \ - && jq -S -e --slurpfile receipts $${receipts} -f $(FILTER) $${target} $(DIFF) $${expected} \ - && rm -f $${target} $${receipts} \ + && ${NORMALIZE} $${target} ${DIFF} $${target}.expected \ + && rm $${target} \ || report "$$rust" "Unexpected json output"; \ done; \ [ -z "$$errors" ] || (echo "===============\nFAILING TESTS:$$errors"; exit 1) From 4f4bf9cf65aed6fe5fa3203ef4181c0e4d04a15f Mon Sep 17 00:00:00 2001 From: cds-amal Date: Thu, 12 Mar 2026 21:11:28 -0400 Subject: [PATCH 3/5] feat(build): add breakpoint detection framework and golden file infrastructure Add build.rs with a breakpoint table that detects the active rustc nightly's commit-date and emits cfg flags for stable MIR API changes. Add nightly_admin.py for managing nightly toolchains (add/check/bump). Update normalise-filter.jq for receipt-driven normalization. Add pr.md to .gitignore. --- .gitignore | 3 +- build.rs | 149 ++++++++ scripts/nightly_admin.py | 472 ++++++++++++++++++++++++++ tests/integration/normalise-filter.jq | 70 +++- 4 files changed, 679 insertions(+), 15 deletions(-) create mode 100644 build.rs create mode 100755 scripts/nightly_admin.py diff --git a/.gitignore b/.gitignore index 8e0c979c..76ba23f0 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,5 @@ target/ tests/ui/failing/* tests/ui/passing/* -tests/ui/debug/* \ No newline at end of file +tests/ui/debug/* +pr.md \ No newline at end of file diff --git a/build.rs b/build.rs new file mode 100644 index 00000000..177d616f --- /dev/null +++ b/build.rs @@ -0,0 +1,149 @@ +//! Build script: detect the active rustc nightly's commit-date and emit +//! `cargo:rustc-cfg` flags so that the rest of the crate can gate match +//! arms (and other code) on stable MIR API changes. +//! +//! The approach: run `rustc -vV`, parse `commit-date: YYYY-MM-DD`, and +//! compare against a table of known API breakpoints. ISO date strings +//! sort lexicographically, so `>=` comparison is correct. + +use std::process::Command; + +/// A single API breakpoint: the date at which the change landed, the +/// cfg flag to emit, and a human-readable description (for the table +/// below; not used at runtime beyond the cargo warning). +struct Breakpoint { + date: &'static str, + cfg: &'static str, + description: &'static str, +} + +/// Known stable MIR API breakpoints. +/// +/// Naming convention: +/// `smir_has_` for additions +/// `smir_no_` for removals +/// +/// Keep this table sorted by date. +const BREAKPOINTS: &[Breakpoint] = &[ + Breakpoint { + date: "2024-12-14", + cfg: "smir_has_coroutine_closure", + description: "AggregateKind::CoroutineClosure added", + }, + Breakpoint { + date: "2025-01-24", + cfg: "smir_has_run_compiler_fn", + description: "RunCompiler struct replaced by run_compiler() free function", + }, + Breakpoint { + date: "2025-01-27", + cfg: "smir_has_named_mono_item_partitions", + description: "MonoItemPartitions changed from tuple to named fields", + }, + Breakpoint { + date: "2025-01-28", + cfg: "smir_has_raw_ptr_kind", + description: "Rvalue::AddressOf changed from Mutability to RawPtrKind", + }, + Breakpoint { + date: "2025-07-04", + cfg: "smir_no_indexed_val", + description: "IndexedVal trait became pub(crate), to_index()/to_val() unavailable", + }, + Breakpoint { + date: "2025-07-07", + cfg: "smir_rustc_internal_moved", + description: "rustc_internal::{internal,stable,run} moved from rustc_smir to stable_mir", + }, + Breakpoint { + date: "2025-07-10", + cfg: "smir_has_global_alloc_typeid", + description: "GlobalAlloc::TypeId { ty } variant added", + }, + Breakpoint { + date: "2025-07-14", + cfg: "smir_crate_renamed", + description: "stable_mir -> rustc_public, rustc_smir -> rustc_public_bridge", + }, + Breakpoint { + date: "2025-07-25", + cfg: "smir_no_coroutine_movability", + description: "Movability removed from RigidTy::Coroutine and AggregateKind::Coroutine", + }, + Breakpoint { + date: "2025-09-18", + cfg: "smir_no_dyn_kind", + description: "DynKind removed from TyKind::Dynamic (3 fields to 2)", + }, + Breakpoint { + date: "2025-10-02", + cfg: "smir_no_projection_subtype", + description: "ProjectionElem::Subtype moved to CastKind::Subtype", + }, + Breakpoint { + date: "2025-10-11", + cfg: "smir_no_deinit", + description: "StatementKind::Deinit removed", + }, + Breakpoint { + date: "2025-11-18", + cfg: "smir_no_nullop_offsetof", + description: "NullOp::OffsetOf removed, NullaryOp loses Ty field", + }, + Breakpoint { + date: "2025-12-05", + cfg: "smir_has_reify_fn_pointer_safety", + description: "PointerCoercion::ReifyFnPointer gains Safety field", + }, + Breakpoint { + date: "2025-12-13", + cfg: "smir_no_filename_display_pref", + description: + "FileNameDisplayPreference became private; display() takes RemapPathScopeComponents", + }, + Breakpoint { + date: "2025-12-22", + cfg: "smir_no_nullary_op", + description: "Rvalue::NullaryOp and NullOp enum removed entirely", + }, +]; + +fn main() { + // Re-run when the toolchain changes. + println!("cargo:rerun-if-env-changed=RUSTUP_TOOLCHAIN"); + println!("cargo:rerun-if-changed=rust-toolchain.toml"); + + let commit_date = detect_commit_date(); + eprintln!("build.rs: rustc commit-date: {commit_date}"); + + for bp in BREAKPOINTS { + // Unconditionally declare the cfg so that rustc doesn't warn about + // `unexpected_cfgs` on nightlies where the flag isn't active. + println!("cargo:rustc-check-cfg=cfg({})", bp.cfg); + + if commit_date.as_str() >= bp.date { + println!("cargo:rustc-cfg={}", bp.cfg); + eprintln!( + "build.rs: enabled cfg `{}` (>= {}): {}", + bp.cfg, bp.date, bp.description + ); + } + } +} + +/// Run `rustc -vV` and extract the `commit-date` field. +fn detect_commit_date() -> String { + let output = Command::new("rustc") + .args(["-vV"]) + .output() + .expect("failed to run `rustc -vV`"); + + let stdout = String::from_utf8(output.stdout).expect("rustc -vV produced non-UTF-8 output"); + + stdout + .lines() + .find_map(|line| line.strip_prefix("commit-date: ")) + .expect("rustc -vV output missing `commit-date` field") + .trim() + .to_string() +} diff --git a/scripts/nightly_admin.py b/scripts/nightly_admin.py new file mode 100755 index 00000000..464ef87c --- /dev/null +++ b/scripts/nightly_admin.py @@ -0,0 +1,472 @@ +#!/usr/bin/env python3 +"""Manage nightly toolchains for stable-mir-json. + +Formalizes the manual workflow for adding, checking, and bumping nightly +toolchains into three composable subcommands. Each step that was previously +a sequence of shell commands and file edits is now a single invocation. + +Usage: + python3 scripts/nightly_admin.py add nightly-YYYY-MM-DD --rust-dir /path/to/rust + python3 scripts/nightly_admin.py check nightly-YYYY-MM-DD --rust-dir /path/to/rust + python3 scripts/nightly_admin.py bump nightly-YYYY-MM-DD +""" + +from __future__ import annotations + +import argparse +import dataclasses +import os +import re +import shutil +import subprocess +import sys +from pathlib import Path + +# --------------------------------------------------------------------------- +# Constants +# --------------------------------------------------------------------------- + +REPO_ROOT = Path(__file__).resolve().parent.parent +RUST_TOOLCHAIN_TOML = REPO_ROOT / "rust-toolchain.toml" +README_MD = REPO_ROOT / "README.md" +DIFF_SCRIPT = REPO_ROOT / "tests" / "ui" / "diff_test_lists.sh" +GOLDEN_BASE = REPO_ROOT / "tests" / "integration" / "expected" +OVERRIDE_BASE = REPO_ROOT / "tests" / "ui" / "overrides" +MAKEFILE = REPO_ROOT / "Makefile" + +NIGHTLY_RE = re.compile(r"^nightly-(\d{4})-(\d{2})-(\d{2})$") +COMPONENTS = ["llvm-tools", "rustc-dev", "rust-src", "rust-analyzer"] + + +# --------------------------------------------------------------------------- +# Data model +# --------------------------------------------------------------------------- + +@dataclasses.dataclass(frozen=True) +class NightlySpec: + """A validated nightly toolchain identifier with derived paths.""" + + channel: str # e.g. "nightly-2025-08-01" + date: str # e.g. "2025-08-01" + + @property + def golden_dir(self) -> Path: + return GOLDEN_BASE / self.channel + + @property + def override_dir(self) -> Path: + return OVERRIDE_BASE / self.channel + + @property + def override_tsv(self) -> Path: + return OVERRIDE_BASE / f"{self.channel}.tsv" + + +# --------------------------------------------------------------------------- +# Utilities +# --------------------------------------------------------------------------- + +def log(msg: str) -> None: + print(f" {msg}", flush=True) + + +def log_step(msg: str) -> None: + print(f"\n>> {msg}", flush=True) + + +def log_warn(msg: str) -> None: + print(f" WARNING: {msg}", file=sys.stderr, flush=True) + + +def die(msg: str) -> None: + print(f"Error: {msg}", file=sys.stderr) + sys.exit(1) + + +def validate_nightly(raw: str) -> NightlySpec: + """Parse and validate a nightly channel string.""" + m = NIGHTLY_RE.match(raw) + if not m: + die(f"invalid nightly format: {raw!r} (expected nightly-YYYY-MM-DD)") + date = f"{m.group(1)}-{m.group(2)}-{m.group(3)}" + return NightlySpec(channel=raw, date=date) + + +def run( + cmd: list[str], + *, + check: bool = True, + capture: bool = False, + env: dict[str, str] | None = None, + cwd: Path | None = None, +) -> subprocess.CompletedProcess[str]: + """Run a subprocess, forwarding output unless capture is requested.""" + merged_env = {**os.environ, **(env or {})} + kwargs: dict = dict( + cwd=cwd or REPO_ROOT, + env=merged_env, + ) + if capture: + kwargs["stdout"] = subprocess.PIPE + kwargs["stderr"] = subprocess.PIPE + kwargs["text"] = True + result = subprocess.run(cmd, **kwargs) + if check and result.returncode != 0: + die(f"command failed (exit {result.returncode}): {' '.join(cmd)}") + return result + + +def toolchain_env(nightly: str) -> dict[str, str]: + """Return env dict that forces a specific toolchain.""" + return {"RUSTUP_TOOLCHAIN": nightly} + + +def read_file(path: Path) -> str: + return path.read_text(encoding="utf-8") + + +def write_file(path: Path, content: str) -> None: + path.write_text(content, encoding="utf-8") + + +def count_lines(path: Path) -> int: + """Count non-empty, non-comment lines in a TSV file.""" + if not path.exists(): + return 0 + return sum( + 1 for line in path.read_text().splitlines() + if line.strip() and not line.startswith("#") + ) + + +def current_pin() -> str: + """Read the currently pinned nightly from rust-toolchain.toml.""" + content = read_file(RUST_TOOLCHAIN_TOML) + m = re.search(r'channel\s*=\s*"([^"]+)"', content) + if not m: + die("could not parse channel from rust-toolchain.toml") + return m.group(1) + + +# --------------------------------------------------------------------------- +# DEFAULT_NIGHTLIES management +# --------------------------------------------------------------------------- + +def read_default_nightlies() -> list[str]: + """Parse DEFAULT_NIGHTLIES from diff_test_lists.sh.""" + content = read_file(DIFF_SCRIPT) + m = re.search(r'DEFAULT_NIGHTLIES="([^"]*)"', content) + if not m: + die("could not parse DEFAULT_NIGHTLIES from diff_test_lists.sh") + return m.group(1).split() + + +def write_default_nightlies(nightlies: list[str]) -> None: + """Rewrite the DEFAULT_NIGHTLIES line, keeping sorted order.""" + content = read_file(DIFF_SCRIPT) + sorted_list = sorted(nightlies) + new_line = f'DEFAULT_NIGHTLIES="{" ".join(sorted_list)}"' + updated = re.sub(r'DEFAULT_NIGHTLIES="[^"]*"', new_line, content) + write_file(DIFF_SCRIPT, updated) + + +# --------------------------------------------------------------------------- +# Override TSV management +# --------------------------------------------------------------------------- + +def find_most_recent_override_tsv(before: NightlySpec) -> Path | None: + """Find the most recent override .tsv file with a date before `before`.""" + candidates: list[tuple[str, Path]] = [] + for f in OVERRIDE_BASE.glob("nightly-*.tsv"): + if f.is_file() and NIGHTLY_RE.match(f.stem): + m = NIGHTLY_RE.match(f.stem) + if m: + fdate = f"{m.group(1)}-{m.group(2)}-{m.group(3)}" + if fdate < before.date: + candidates.append((fdate, f)) + if not candidates: + return None + candidates.sort(key=lambda x: x[0]) + return candidates[-1][1] + + +def create_override_tsv(spec: NightlySpec) -> Path: + """Create an override .tsv for the given nightly, templated from the most + recent existing one.""" + if spec.override_tsv.exists(): + log(f"override TSV already exists: {spec.override_tsv.relative_to(REPO_ROOT)}") + return spec.override_tsv + + template = find_most_recent_override_tsv(spec) + if template is not None: + content = read_file(template) + # Update the header comment's nightly reference + old_nightly = template.stem + content = content.replace(old_nightly, spec.channel, 1) + write_file(spec.override_tsv, content) + log(f"created override TSV (from {template.name})") + else: + header = ( + f"# Manual overrides for {spec.channel}\n" + f"# Format: actionpath[extra]\n" + f"#\n" + f"# Actions:\n" + f"# - remove from passing list\n" + f"# + add to passing list\n" + f"# skip remove from passing list (alias for -)\n" + f"# fail move to failing list (extra = expected exit code)\n" + f"# pass move from failing to passing list\n" + ) + write_file(spec.override_tsv, header) + log("created skeleton override TSV (no prior template found)") + + return spec.override_tsv + + +# --------------------------------------------------------------------------- +# Subcommand: add +# --------------------------------------------------------------------------- + +def cmd_add(args: argparse.Namespace) -> None: + """Add support for a new nightly toolchain.""" + spec = validate_nightly(args.nightly) + rust_dir = Path(args.rust_dir).resolve() + if not rust_dir.is_dir(): + die(f"RUST_DIR_ROOT is not a directory: {rust_dir}") + + print(f"Adding nightly: {spec.channel}") + env = toolchain_env(spec.channel) + + # 1. Install toolchain + log_step("Installing toolchain") + install_cmd = ["rustup", "toolchain", "install", spec.channel] + run(install_cmd) + run(["rustup", "component", "add", *COMPONENTS, "--toolchain", spec.channel]) + + # 2. Build + if not args.skip_build: + log_step("Building with target toolchain") + result = run(["cargo", "build"], env=env, check=False) + if result.returncode != 0: + die( + "build failed; you may need to:\n" + " - Add compat code in src/printer/ or src/mk_graph/\n" + " - Add a new breakpoint in build.rs\n" + " - See docs/nightly-compat.md for the full playbook" + ) + + # 3. Generate golden files + log_step("Generating integration test golden files") + if spec.golden_dir.exists() and not args.force: + log(f"golden files already exist: {spec.golden_dir.relative_to(REPO_ROOT)}") + else: + spec.golden_dir.mkdir(parents=True, exist_ok=True) + run(["make", "golden"], env=env) + n_golden = len(list(spec.golden_dir.glob("*.expected"))) + log(f"{n_golden} golden files in {spec.golden_dir.relative_to(REPO_ROOT)}") + + # 4. Generate UI test effective lists + if not args.skip_ui: + log_step("Generating UI test effective lists") + run( + ["make", "test-ui-emit"], + env={**env, "RUST_DIR_ROOT": str(rust_dir), "NIGHTLY": spec.channel}, + ) + n_pass = count_lines(spec.override_dir / "passing.tsv") + n_fail = count_lines(spec.override_dir / "failing.tsv") + log(f"effective lists: {n_pass} passing, {n_fail} failing") + + # 5. Create override TSV + log_step("Creating override TSV") + create_override_tsv(spec) + + # 6. Add to DEFAULT_NIGHTLIES + log_step("Updating DEFAULT_NIGHTLIES") + nightlies = read_default_nightlies() + if spec.channel in nightlies: + log("already in DEFAULT_NIGHTLIES") + else: + nightlies.append(spec.channel) + write_default_nightlies(nightlies) + log(f"added {spec.channel} to DEFAULT_NIGHTLIES") + + # 7. Report + print(f"\nDone. Next steps:") + print(f" - Review {spec.override_tsv.relative_to(REPO_ROOT)} for accuracy") + print(f" - Run: python3 scripts/nightly_admin.py check {spec.channel} --rust-dir {rust_dir}") + + +# --------------------------------------------------------------------------- +# Subcommand: check +# --------------------------------------------------------------------------- + +def cmd_check(args: argparse.Namespace) -> None: + """Run all tests for a nightly toolchain.""" + spec = validate_nightly(args.nightly) + rust_dir = Path(args.rust_dir).resolve() + if not rust_dir.is_dir(): + die(f"RUST_DIR_ROOT is not a directory: {rust_dir}") + + print(f"Checking nightly: {spec.channel}") + env = toolchain_env(spec.channel) + + # Pre-flight + if not spec.golden_dir.exists(): + die( + f"no golden files for {spec.channel}; run " + f"'python3 scripts/nightly_admin.py add {spec.channel} --rust-dir {rust_dir}' first" + ) + + results: list[tuple[str, bool]] = [] + + # 1. Build + if not args.skip_build: + log_step("Build") + r = run(["cargo", "build"], env=env, check=False) + results.append(("Build", r.returncode == 0)) + if r.returncode != 0: + log("FAIL") + else: + log("PASS") + + # 2. Integration tests + log_step("Integration tests") + r = run(["make", "integration-test"], env=env, check=False) + results.append(("Integration tests", r.returncode == 0)) + log("PASS" if r.returncode == 0 else "FAIL") + + # 3. UI tests + if spec.override_dir.exists(): + log_step("UI tests") + r = run( + ["make", "test-ui"], + env={**env, "RUST_DIR_ROOT": str(rust_dir)}, + check=False, + ) + results.append(("UI tests", r.returncode == 0)) + log("PASS" if r.returncode == 0 else "FAIL") + else: + log_step("UI tests (skipped: no effective lists)") + results.append(("UI tests", True)) + + # 4. Directive parser tests + log_step("Directive parser tests") + r = run(["make", "test-directives"], check=False) + results.append(("Directive tests", r.returncode == 0)) + log("PASS" if r.returncode == 0 else "FAIL") + + # Summary + print(f"\n{'=' * 40}") + print(f"Nightly check: {spec.channel}\n") + all_pass = True + for name, passed in results: + status = "PASS" if passed else "FAIL" + print(f" {name:<25} {status}") + if not passed: + all_pass = False + print(f"\nOverall: {'PASS' if all_pass else 'FAIL'}") + sys.exit(0 if all_pass else 1) + + +# --------------------------------------------------------------------------- +# Subcommand: bump +# --------------------------------------------------------------------------- + +def cmd_bump(args: argparse.Namespace) -> None: + """Bump the pinned nightly in rust-toolchain.toml and README.md.""" + spec = validate_nightly(args.nightly) + old_pin = current_pin() + + print(f"Bumping pinned nightly: {old_pin} -> {spec.channel}") + + warnings: list[str] = [] + if not spec.golden_dir.exists(): + warnings.append( + f"no golden files for {spec.channel}; " + f"run 'python3 scripts/nightly_admin.py add {spec.channel} ...' first" + ) + if not spec.override_dir.exists(): + warnings.append( + f"no UI test effective lists for {spec.channel}; " + f"run 'python3 scripts/nightly_admin.py add {spec.channel} ...' first" + ) + if spec.channel < old_pin: + warnings.append( + f"target nightly {spec.channel} is older than current pin {old_pin}" + ) + + for w in warnings: + log_warn(w) + + if args.dry_run: + print("\nDry run; no files modified.") + return + + # Update rust-toolchain.toml + content = read_file(RUST_TOOLCHAIN_TOML) + updated = re.sub(r'channel\s*=\s*"[^"]*"', f'channel = "{spec.channel}"', content) + write_file(RUST_TOOLCHAIN_TOML, updated) + log(f"updated rust-toolchain.toml: {old_pin} -> {spec.channel}") + + # Update README.md + readme = read_file(README_MD) + new_readme = re.sub( + r"Pinned nightly: `[^`]*`", + f"Pinned nightly: `{spec.channel}`", + readme, + ) + new_readme = re.sub( + r"through `[^`]*`", + f"through `{spec.channel}`", + new_readme, + ) + if new_readme == readme: + log_warn("README.md pinned nightly callout not found; manual update needed") + else: + write_file(README_MD, new_readme) + log(f"updated README.md pinned nightly and supported range") + + # Report + print(f"\nDone. Next steps:") + print(f" - Run: cargo build") + print(f" - Run: python3 scripts/nightly_admin.py check {spec.channel} --rust-dir ...") + print(f" - Commit the changes") + + +# --------------------------------------------------------------------------- +# CLI entry point +# --------------------------------------------------------------------------- + +def main() -> None: + parser = argparse.ArgumentParser( + prog="nightly_admin", + description="Manage nightly toolchains for stable-mir-json.", + ) + sub = parser.add_subparsers(dest="command", required=True) + + # --- add --- + p_add = sub.add_parser("add", help="Add support for a new nightly") + p_add.add_argument("nightly", help="Toolchain channel (e.g. nightly-2025-08-01)") + p_add.add_argument("--rust-dir", required=True, help="Path to rust-lang/rust checkout") + p_add.add_argument("--skip-build", action="store_true", help="Skip build verification") + p_add.add_argument("--skip-ui", action="store_true", help="Skip UI test list generation") + p_add.add_argument("--force", action="store_true", help="Regenerate existing artifacts") + + # --- check --- + p_check = sub.add_parser("check", help="Run all tests for a nightly") + p_check.add_argument("nightly", help="Toolchain channel") + p_check.add_argument("--rust-dir", required=True, help="Path to rust-lang/rust checkout") + p_check.add_argument("--skip-build", action="store_true", help="Skip build step") + + # --- bump --- + p_bump = sub.add_parser("bump", help="Bump the pinned nightly") + p_bump.add_argument("nightly", help="Toolchain channel to pin to") + p_bump.add_argument("--dry-run", action="store_true", help="Show what would change") + + args = parser.parse_args() + dispatch = {"add": cmd_add, "check": cmd_check, "bump": cmd_bump} + dispatch[args.command](args) + + +if __name__ == "__main__": + main() diff --git a/tests/integration/normalise-filter.jq b/tests/integration/normalise-filter.jq index d9ff1005..0485959c 100644 --- a/tests/integration/normalise-filter.jq +++ b/tests/integration/normalise-filter.jq @@ -1,6 +1,32 @@ -# Remove the hashes at the end of mangled names -.functions = ( [ .functions[] | if .[1].NormalSym then .[1].NormalSym = .[1].NormalSym[:-17] else . end ] ) - | .items = ( [ .items[] | if .symbol_name then .symbol_name = .symbol_name[:-17] else . end ] ) +# normalise-filter.jq +# +# Normalizes *.smir.json output for golden-file comparison. Interned +# indices (Ty, Span, DefId, etc.) are non-deterministic across platforms +# and runs; we strip or zero them so that cross-platform diffs are clean. +# +# This filter reads a companion receipts file ($receipts) that declares +# which JSON paths carry interned indices. See ADR-004 for the design. +# +# The receipts cover the Body tree (where the whack-a-mole problem lives); +# top-level array transformations below are structural and stay explicit. + +# ── Hash stripping ────────────────────────────────────────────────────── +# +# Strip platform-specific crate hashes from mangled symbol names. +# Legacy mangling (_ZN...): hash is always the trailing 17 chars (16 hex + "h" prefix). +# v0 mangling (_R...): crate disambiguators appear as C_ throughout the symbol; +# replace each with "C_" to normalize across platforms. +def strip_hashes: + if startswith("_R") then gsub("C[a-zA-Z0-9]+_(?=[0-9])"; "C_") + else .[:-17] end; + +# ── Top-level structural transforms ───────────────────────────────────── +# +# These operate on the SmirJson arrays directly and are unrelated to the +# walk-based interned-index normalization that the receipts drive. + +.functions = ( [ .functions[] | if .[1].NormalSym then .[1].NormalSym = (.[1].NormalSym | strip_hashes) else . end ] ) + | .items = ( [ .items[] | if .symbol_name then .symbol_name = (.symbol_name | strip_hashes) else . end ] ) # delete unstable alloc, function, and type IDs | .allocs = ( .allocs | map(del(.alloc_id)) | map(del(.ty)) ) | .functions = ( [ .functions[] ] | map(del(.[0])) ) @@ -8,10 +34,12 @@ # remove "Never" type | .types = ( [ .types[] ] | map(select(.[0] != "VoidType")) ) | -# Apply the normalisation filter + +# ── Restructure and sort ──────────────────────────────────────────────── + { allocs: ( .allocs | sort ), functions: (.functions | sort ), - items: (.items | map(walk(if type == "object" then del(.ty) else . end)) | sort ), + items: (.items | sort_by(.symbol_name + "|" + (.mono_item_kind.MonoItemFn.name // "")) ), types: ( [ # sort by constructors and remove unstable IDs within each ( .types | map(select(.[0].PrimitiveType)) | sort ), @@ -29,12 +57,26 @@ ( .types | map(select(.[0].FunType) | sort) ) ] | flatten(1) ) } -# Strip def_id fields globally. These are interned compiler indices (the -# underlying ID inside AdtDef) that are consistent within a single rustc -# invocation but not stable across runs; the same non-determinism that -# affects alloc_id, Ty indices, and adt_def (see lines 5-6, 18-21 above). -# Downstream consumers use adt_def/def_id as cross-reference keys to join -# AggregateKind::Adt in MIR bodies with type metadata entries, so the -# values can't be dropped from the output itself; we only strip them here -# for golden-file comparison. -| walk(if type == "object" then del(.def_id) else . end) + +# ── Receipt-driven interned-index normalization ───────────────────────── +# +# Instead of hardcoding per-field rules, we read the receipts and apply +# three generic passes: +# +# 1. interned_keys: delete object fields whose values are interned +# 2. interned_newtypes: zero enum-variant wrappers around bare integers +# 3. interned_positions: zero known tuple positions carrying interned indices + +| walk(if type == "object" then + # 1. Strip interned key fields (e.g. "span", "ty", "def_id", "id") + reduce ($receipts[0].interned_keys[]) as $k (.; del(.[$k])) + # 2. Zero interned newtype wrappers (e.g. {"Type": 42} → {"Type": 0}) + | reduce ($receipts[0].interned_newtypes[]) as $n (.; + if .[$n] and (.[$n] | type) == "number" then .[$n] = 0 else . end) + # 3. Zero interned positions in tuple variants (e.g. Cast[2], Field[1]) + | reduce ($receipts[0].interned_positions | to_entries[]) as $e (.; + if .[$e.key] and (.[$e.key] | type) == "array" then + reduce ($e.value[]) as $p (.; + if .[$e.key][$p] then .[$e.key][$p] = 0 else . end) + else . end) + else . end) From 6daf96015bd6e8c20917f32db5916ec8822d39d0 Mon Sep 17 00:00:00 2001 From: cds-amal Date: Thu, 12 Mar 2026 21:11:33 -0400 Subject: [PATCH 4/5] feat(compat): add compat code for initial breakpoints (2025-01-24 through 2025-03-01) --- src/compat/mono_collect.rs | 5 +++++ src/driver.rs | 5 +++++ src/mk_graph/context.rs | 24 ++++++++++++++++-------- src/mk_graph/output/dot.rs | 8 ++++---- src/mk_graph/util.rs | 23 ++++++++++++++++++++--- 5 files changed, 50 insertions(+), 15 deletions(-) diff --git a/src/compat/mono_collect.rs b/src/compat/mono_collect.rs index e99ac9d0..8a43a8c5 100644 --- a/src/compat/mono_collect.rs +++ b/src/compat/mono_collect.rs @@ -11,7 +11,12 @@ use stable_mir::mir::mono::MonoItem; /// Collect all monomorphized items from the compiler. pub fn mono_collect(tcx: TyCtxt<'_>) -> Vec { + // In nightlies >= 2025-01-27, MonoItemPartitions changed from a tuple + // to named fields. See build.rs BREAKPOINTS table. + #[cfg(not(smir_has_named_mono_item_partitions))] let units = tcx.collect_and_partition_mono_items(()).1; + #[cfg(smir_has_named_mono_item_partitions)] + let units = tcx.collect_and_partition_mono_items(()).codegen_units; units .iter() .flat_map(|unit| { diff --git a/src/driver.rs b/src/driver.rs index 7522ebd8..0e348138 100644 --- a/src/driver.rs +++ b/src/driver.rs @@ -44,5 +44,10 @@ pub fn stable_mir_driver(args_outer: &[String], callback_fn: fn(TyCtxt) -> ()) { let early_dcx = rustc_session::EarlyDiagCtxt::new(rustc_session::config::ErrorOutputType::default()); rustc_driver::init_rustc_env_logger(&early_dcx); + // In nightlies >= 2025-01-24, RunCompiler was replaced with a free + // function run_compiler(). See build.rs BREAKPOINTS table. + #[cfg(not(smir_has_run_compiler_fn))] let _ = rustc_driver::RunCompiler::new(args_outer, &mut callbacks).run(); + #[cfg(smir_has_run_compiler_fn)] + rustc_driver::run_compiler(args_outer, &mut callbacks); } diff --git a/src/mk_graph/context.rs b/src/mk_graph/context.rs index fd620299..aec1afca 100644 --- a/src/mk_graph/context.rs +++ b/src/mk_graph/context.rs @@ -3,9 +3,11 @@ use std::collections::HashMap; use crate::compat::stable_mir; +#[cfg(not(smir_has_raw_ptr_kind))] +use stable_mir::mir::Mutability; use stable_mir::mir::{ - BorrowKind, ConstOperand, Mutability, NonDivergingIntrinsic, Operand, Rvalue, Statement, - StatementKind, Terminator, TerminatorKind, + BorrowKind, ConstOperand, NonDivergingIntrinsic, Operand, Rvalue, Statement, StatementKind, + Terminator, TerminatorKind, }; use stable_mir::ty::{ConstantKind, IndexedVal, MirConst, Ty}; @@ -153,8 +155,8 @@ impl GraphContext { } => format!("Ascribe {}.{}", place.label(), projections.base), Coverage(_) => "Coverage".to_string(), Intrinsic(intr) => format!("Intr: {}", self.render_intrinsic(intr)), - ConstEvalCounter {} => "ConstEvalCounter".to_string(), - Nop {} => "Nop".to_string(), + ConstEvalCounter => "ConstEvalCounter".to_string(), + Nop => "Nop".to_string(), } } @@ -162,10 +164,16 @@ impl GraphContext { pub fn render_rvalue(&self, v: &Rvalue) -> String { use Rvalue::*; match v { + // In nightlies >= 2025-01-28, AddressOf's first field changed from + // Mutability (Mut/Not) to RawPtrKind (Mut/Const/FakeForPtrMetadata). + // See build.rs BREAKPOINTS table. + #[cfg(not(smir_has_raw_ptr_kind))] AddressOf(mutability, p) => match mutability { Mutability::Not => format!("&raw {}", p.label()), Mutability::Mut => format!("&raw mut {}", p.label()), }, + #[cfg(smir_has_raw_ptr_kind)] + AddressOf(kind, p) => format!("&raw {:?} {}", kind, p.label()), Aggregate(kind, operands) => { let os: Vec = operands.iter().map(|op| self.render_operand(op)).collect(); format!("{} ({})", kind.label(), os.join(", ")) @@ -227,10 +235,10 @@ impl GraphContext { match &term.kind { Goto { .. } => "Goto".to_string(), SwitchInt { discr, .. } => format!("SwitchInt {}", self.render_operand(discr)), - Resume {} => "Resume".to_string(), - Abort {} => "Abort".to_string(), - Return {} => "Return".to_string(), - Unreachable {} => "Unreachable".to_string(), + Resume => "Resume".to_string(), + Abort => "Abort".to_string(), + Return => "Return".to_string(), + Unreachable => "Unreachable".to_string(), Drop { place, .. } => format!("Drop {}", place.label()), Call { func, diff --git a/src/mk_graph/output/dot.rs b/src/mk_graph/output/dot.rs index 78f03478..142ba4e0 100644 --- a/src/mk_graph/output/dot.rs +++ b/src/mk_graph/output/dot.rs @@ -125,16 +125,16 @@ impl SmirJson { .attributes() .set_label("other"); } - Resume {} => { + Resume => { label_strs.push("Resume".to_string()); } - Abort {} => { + Abort => { label_strs.push("Abort".to_string()); } - Return {} => { + Return => { label_strs.push("Return".to_string()); } - Unreachable {} => { + Unreachable => { label_strs.push("Unreachable".to_string()); } TerminatorKind::Drop { diff --git a/src/mk_graph/util.rs b/src/mk_graph/util.rs index ac21cbb1..c5d278eb 100644 --- a/src/mk_graph/util.rs +++ b/src/mk_graph/util.rs @@ -44,16 +44,27 @@ impl GraphLabelString for Operand { } } } - +/// Some `AggregateKind` variants only exist on certain nightlies (the +/// stable MIR API evolves across compiler versions). Arms gated with +/// `#[cfg(smir_has_*)]` are toggled by `build.rs`, which inspects the +/// active rustc's commit-date and emits the appropriate cfg flags. +/// This keeps the match exhaustive on every supported nightly: without +/// the flag the variant doesn't exist in the enum, so the arm is +/// excluded; with the flag the arm is included to cover the new variant. impl GraphLabelString for AggregateKind { fn label(&self) -> String { use AggregateKind::*; match &self { Array(_ty) => "Array".to_string(), - Tuple {} => "Tuple".to_string(), + Tuple => "Tuple".to_string(), Adt(_, idx, _, _, _) => format!("Adt{{{}}}", idx.to_index()), Closure(_, _) => "Closure".to_string(), Coroutine(_, _, _) => "Coroutine".to_string(), + + // Added in nightlies >= 2024-12-14; see build.rs BREAKPOINTS table. + #[cfg(smir_has_coroutine_closure)] + CoroutineClosure(_, _) => "CoroutineClosure".to_string(), + RawPtr(ty, Mutability::Mut) => format!("*mut ({})", ty), RawPtr(ty, Mutability::Not) => format!("*({})", ty), } @@ -64,10 +75,16 @@ impl GraphLabelString for Rvalue { fn label(&self) -> String { use Rvalue::*; match &self { + // In nightlies >= 2025-01-28, AddressOf's first field changed from + // Mutability (Mut/Not) to RawPtrKind (Mut/Const/FakeForPtrMetadata). + // See build.rs BREAKPOINTS table. + #[cfg(not(smir_has_raw_ptr_kind))] AddressOf(mutability, p) => match mutability { Mutability::Not => format!("&raw {}", p.label()), Mutability::Mut => format!("&raw mut {}", p.label()), }, + #[cfg(smir_has_raw_ptr_kind)] + AddressOf(kind, p) => format!("&raw {:?} {}", kind, p.label()), Aggregate(kind, operands) => { let os: Vec = operands.iter().map(|op| op.label()).collect(); format!("{} ({})", kind.label(), os.join(", ")) @@ -239,7 +256,7 @@ pub fn terminator_targets(term: &Terminator) -> Vec { result.push(targets.otherwise()); result } - Resume {} | Abort {} | Return {} | Unreachable {} => vec![], + Resume | Abort | Return | Unreachable => vec![], Drop { target, unwind, .. } => { let mut result = vec![*target]; if let UnwindAction::Cleanup(t) = unwind { From 8754b7e8d8f4ae43f4cf0dbd9601c153281dc6de Mon Sep 17 00:00:00 2001 From: cds-amal Date: Thu, 12 Mar 2026 21:11:50 -0400 Subject: [PATCH 5/5] test: migrate golden files to per-nightly directories Move integration test expected outputs from flat files in programs/ to per-nightly directories under expected/nightly-2025-03-01/, enabling the test harness to select the correct golden files for the active toolchain. --- .../assert_eq.smir.json.expected | 3456 ++++-------- .../binop.smir.json.expected | 2471 +++------ .../char-trivial.smir.json.expected | 1325 ++--- .../closure-args.smir.json.expected | 1605 +++--- .../closure-no-args.smir.json.expected | 1422 ++--- .../const-arithm-simple.smir.json.expected | 1428 ++--- .../div.smir.json.expected | 1344 ++--- .../double-ref-deref.smir.json.expected | 1327 ++--- .../enum.smir.json.expected | 1392 ++--- .../fibonacci.smir.json.expected | 2797 +++++----- .../float.smir.json.expected | 2329 ++++----- .../fn-ptr-in-arg.smir.json.expected | 4645 +++++++++-------- .../modulo.smir.json.expected | 2064 +++----- .../mutual_recursion.smir.json.expected | 1501 ++---- .../option-construction.smir.json.expected | 1546 +++--- .../param_types.smir.json.expected | 3350 ++++++------ .../primitive-type-bounds.smir.json.expected | 1335 ++--- .../recursion-simple-match.smir.json.expected | 1858 +++---- .../recursion-simple.smir.json.expected | 1858 +++---- .../ref-deref.smir.json.expected | 1501 ++---- .../shl_min.smir.json.expected | 4205 +++++++-------- .../slice.smir.json.expected | 4073 ++++++--------- ...vtable-nonbuiltin-deref.smir.json.expected | 2055 ++++---- .../strange-ref-deref.smir.json.expected | 1327 ++--- .../struct.smir.json.expected | 2054 +++----- .../sum-to-n.smir.json.expected | 3007 +++++------ .../tuple-eq.smir.json.expected | 2049 +++----- .../tuples-simple.smir.json.expected | 1321 ++--- .../weirdRefs.smir.json.expected | 3832 ++++++-------- 29 files changed, 26278 insertions(+), 38199 deletions(-) rename tests/integration/{programs => expected/nightly-2025-03-01}/assert_eq.smir.json.expected (72%) rename tests/integration/{programs => expected/nightly-2025-03-01}/binop.smir.json.expected (87%) rename tests/integration/{programs => expected/nightly-2025-03-01}/char-trivial.smir.json.expected (77%) rename tests/integration/{programs => expected/nightly-2025-03-01}/closure-args.smir.json.expected (79%) rename tests/integration/{programs => expected/nightly-2025-03-01}/closure-no-args.smir.json.expected (77%) rename tests/integration/{programs => expected/nightly-2025-03-01}/const-arithm-simple.smir.json.expected (78%) rename tests/integration/{programs => expected/nightly-2025-03-01}/div.smir.json.expected (79%) rename tests/integration/{programs => expected/nightly-2025-03-01}/double-ref-deref.smir.json.expected (78%) rename tests/integration/{programs => expected/nightly-2025-03-01}/enum.smir.json.expected (75%) rename tests/integration/{programs => expected/nightly-2025-03-01}/fibonacci.smir.json.expected (80%) rename tests/integration/{programs => expected/nightly-2025-03-01}/float.smir.json.expected (80%) rename tests/integration/{programs => expected/nightly-2025-03-01}/fn-ptr-in-arg.smir.json.expected (86%) rename tests/integration/{programs => expected/nightly-2025-03-01}/modulo.smir.json.expected (79%) rename tests/integration/{programs => expected/nightly-2025-03-01}/mutual_recursion.smir.json.expected (80%) rename tests/integration/{programs => expected/nightly-2025-03-01}/option-construction.smir.json.expected (78%) rename tests/integration/{programs => expected/nightly-2025-03-01}/param_types.smir.json.expected (86%) rename tests/integration/{programs => expected/nightly-2025-03-01}/primitive-type-bounds.smir.json.expected (79%) rename tests/integration/{programs => expected/nightly-2025-03-01}/recursion-simple-match.smir.json.expected (79%) rename tests/integration/{programs => expected/nightly-2025-03-01}/recursion-simple.smir.json.expected (79%) rename tests/integration/{programs => expected/nightly-2025-03-01}/ref-deref.smir.json.expected (77%) rename tests/integration/{programs => expected/nightly-2025-03-01}/shl_min.smir.json.expected (84%) rename tests/integration/{programs => expected/nightly-2025-03-01}/slice.smir.json.expected (83%) rename tests/integration/{programs => expected/nightly-2025-03-01}/static-vtable-nonbuiltin-deref.smir.json.expected (83%) rename tests/integration/{programs => expected/nightly-2025-03-01}/strange-ref-deref.smir.json.expected (78%) rename tests/integration/{programs => expected/nightly-2025-03-01}/struct.smir.json.expected (79%) rename tests/integration/{programs => expected/nightly-2025-03-01}/sum-to-n.smir.json.expected (80%) rename tests/integration/{programs => expected/nightly-2025-03-01}/tuple-eq.smir.json.expected (80%) rename tests/integration/{programs => expected/nightly-2025-03-01}/tuples-simple.smir.json.expected (78%) rename tests/integration/{programs => expected/nightly-2025-03-01}/weirdRefs.smir.json.expected (83%) diff --git a/tests/integration/programs/assert_eq.smir.json.expected b/tests/integration/expected/nightly-2025-03-01/assert_eq.smir.json.expected similarity index 72% rename from tests/integration/programs/assert_eq.smir.json.expected rename to tests/integration/expected/nightly-2025-03-01/assert_eq.smir.json.expected index ee3c7ecd..ca4cba95 100644 --- a/tests/integration/programs/assert_eq.smir.json.expected +++ b/tests/integration/expected/nightly-2025-03-01/assert_eq.smir.json.expected @@ -26,26 +26,6 @@ "NormalSym": "_ZN3std3sys9backtrace28__rust_begin_short_backtrace17h" } ], - [ - { - "NormalSym": "_ZN4core3fmt3num3imp52_$LT$impl$u20$core..fmt..Display$u20$for$u20$i32$GT$3fmt17h" - } - ], - [ - { - "NormalSym": "_ZN4core3fmt3num50_$LT$impl$u20$core..fmt..Debug$u20$for$u20$i32$GT$3fmt17h" - } - ], - [ - { - "NormalSym": "_ZN4core3fmt3num53_$LT$impl$u20$core..fmt..LowerHex$u20$for$u20$i32$GT$3fmt17h" - } - ], - [ - { - "NormalSym": "_ZN4core3fmt3num53_$LT$impl$u20$core..fmt..UpperHex$u20$for$u20$i32$GT$3fmt17h" - } - ], [ { "NormalSym": "_ZN4core3ops8function6FnOnce9call_once17h" @@ -61,11 +41,6 @@ "NormalSym": "_ZN4core9panicking13assert_failed17h" } ], - [ - { - "NormalSym": "_ZN4core9panicking19assert_failed_inner17h" - } - ], [ { "NormalSym": "_ZN54_$LT$$LP$$RP$$u20$as$u20$std..process..Termination$GT$6report17h" @@ -78,222 +53,66 @@ "mono_item_kind": { "MonoItemFn": { "body": { - "arg_count": 0, + "arg_count": 4, "blocks": [ { "statements": [ { "kind": { - "Assign": [ - { - "local": 1, - "projection": [] - }, - { - "Use": { - "Constant": { - "const_": { - "id": 18, - "kind": { - "Allocated": { - "align": 4, - "bytes": [ - 42, - 0, - 0, - 0 - ], - "mutability": "Mut", - "provenance": { - "ptrs": [] - } - } - } - }, - "span": 93, - "user_ty": null - } - } - } - ] - }, - "span": 93 + "StorageLive": 5 + } + }, + { + "kind": { + "StorageLive": 7 + } }, { "kind": { "Assign": [ { - "local": 3, + "local": 7, "projection": [] }, { - "CheckedBinaryOp": [ - "Add", + "Aggregate": [ { - "Constant": { - "const_": { - "id": 16, - "kind": { - "Allocated": { - "align": 4, - "bytes": [ - 3, - 0, - 0, - 0 - ], - "mutability": "Mut", - "provenance": { - "ptrs": [] - } - } + "Closure": [ + 0, + [ + { + "Type": 0 + }, + { + "Type": 0 + }, + { + "Type": 0 + }, + { + "Type": 0 } - }, - "span": 90, - "user_ty": null - } + ] + ] }, - { - "Constant": { - "const_": { - "id": 17, - "kind": { - "Allocated": { - "align": 4, - "bytes": [ - 39, - 0, - 0, - 0 - ], - "mutability": "Mut", - "provenance": { - "ptrs": [] - } - } - } - }, - "span": 91, - "user_ty": null + [ + { + "Copy": { + "local": 1, + "projection": [] + } } - } + ] ] } ] - }, - "span": 92 - } - ], - "terminator": { - "kind": { - "Assert": { - "cond": { - "Move": { - "local": 3, - "projection": [ - { - "Field": [ - 1, - 40 - ] - } - ] - } - }, - "expected": false, - "msg": { - "Overflow": [ - "Add", - { - "Constant": { - "const_": { - "id": 16, - "kind": { - "Allocated": { - "align": 4, - "bytes": [ - 3, - 0, - 0, - 0 - ], - "mutability": "Mut", - "provenance": { - "ptrs": [] - } - } - } - }, - "span": 90, - "user_ty": null - } - }, - { - "Constant": { - "const_": { - "id": 17, - "kind": { - "Allocated": { - "align": 4, - "bytes": [ - 39, - 0, - 0, - 0 - ], - "mutability": "Mut", - "provenance": { - "ptrs": [] - } - } - } - }, - "span": 91, - "user_ty": null - } - } - ] - }, - "target": 1, - "unwind": "Continue" } }, - "span": 92 - } - }, - { - "statements": [ - { - "kind": { - "Assign": [ - { - "local": 2, - "projection": [] - }, - { - "Use": { - "Move": { - "local": 3, - "projection": [ - { - "Field": [ - 0, - 16 - ] - } - ] - } - } - } - ] - }, - "span": 92 - }, { "kind": { "Assign": [ { - "local": 5, + "local": 6, "projection": [] }, { @@ -303,401 +122,138 @@ }, "Shared", { - "local": 2, + "local": 7, "projection": [] } ] } ] - }, - "span": 95 + } }, { "kind": { "Assign": [ { - "local": 6, + "local": 5, "projection": [] }, { - "Ref": [ + "Cast": [ { - "kind": "ReErased" + "PointerCoercion": "Unsize" }, - "Shared", { - "local": 1, - "projection": [] - } + "Copy": { + "local": 6, + "projection": [] + } + }, + 0 ] } ] - }, - "span": 96 - }, - { - "kind": { - "Assign": [ - { - "local": 4, - "projection": [] - }, - { - "Aggregate": [ - "Tuple", - [ - { - "Move": { - "local": 5, - "projection": [] - } - }, - { - "Move": { - "local": 6, - "projection": [] - } - } - ] - ] - } - ] - }, - "span": 97 - }, - { - "kind": { - "Assign": [ - { - "local": 7, - "projection": [] - }, - { - "Use": { - "Copy": { - "local": 4, - "projection": [ - { - "Field": [ - 0, - 25 - ] - } - ] - } - } - } - ] - }, - "span": 98 - }, - { - "kind": { - "Assign": [ - { - "local": 8, - "projection": [] - }, - { - "Use": { - "Copy": { - "local": 4, - "projection": [ - { - "Field": [ - 1, - 25 - ] - } - ] - } - } - } - ] - }, - "span": 99 - }, - { - "kind": { - "Assign": [ - { - "local": 10, - "projection": [] - }, - { - "Use": { - "Copy": { - "local": 7, - "projection": [ - "Deref" - ] - } - } - } - ] - }, - "span": 100 - }, - { - "kind": { - "Assign": [ - { - "local": 11, - "projection": [] - }, - { - "Use": { - "Copy": { - "local": 8, - "projection": [ - "Deref" - ] - } - } - } - ] - }, - "span": 101 - }, - { - "kind": { - "Assign": [ - { - "local": 9, - "projection": [] - }, - { - "BinaryOp": [ - "Eq", - { - "Move": { - "local": 10, - "projection": [] - } - }, - { - "Move": { - "local": 11, - "projection": [] - } - } - ] - } - ] - }, - "span": 94 - } - ], - "terminator": { - "kind": { - "SwitchInt": { - "discr": { - "Move": { - "local": 9, - "projection": [] - } - }, - "targets": { - "branches": [ - [ - 0, - 3 - ] - ], - "otherwise": 2 - } - } - }, - "span": 94 - } - }, - { - "statements": [], - "terminator": { - "kind": "Return", - "span": 102 - } - }, - { - "statements": [ - { - "kind": { - "Assign": [ - { - "local": 12, - "projection": [] - }, - { - "Aggregate": [ - { - "Adt": [ - 10, - 0, - [], - null, - null - ] - }, - [] - ] - } - ] - }, - "span": 105 - }, - { - "kind": { - "Assign": [ - { - "local": 14, - "projection": [] - }, - { - "Aggregate": [ - { - "Adt": [ - 11, - 0, - [ - { - "Type": 42 - } - ], - null, - null - ] - }, - [] - ] - } - ] - }, - "span": 106 - } - ], - "terminator": { - "kind": { - "Call": { - "args": [ + } + } + ], + "terminator": { + "kind": { + "Call": { + "args": [ { "Move": { - "local": 12, + "local": 5, "projection": [] } }, { - "Copy": { - "local": 7, + "Move": { + "local": 2, "projection": [] } }, { - "Copy": { - "local": 8, + "Move": { + "local": 3, "projection": [] } }, { "Move": { - "local": 14, + "local": 4, "projection": [] } } ], "destination": { - "local": 13, + "local": 0, "projection": [] }, "func": { "Constant": { "const_": { - "id": 19, "kind": "ZeroSized" }, - "span": 103, "user_ty": null } }, - "target": null, + "target": 1, "unwind": "Continue" } + } + } + }, + { + "statements": [ + { + "kind": { + "StorageDead": 5 + } }, - "span": 104 + { + "kind": { + "StorageDead": 7 + } + } + ], + "terminator": { + "kind": "Return" } } ], "locals": [ { - "mutability": "Mut", - "span": 107 + "mutability": "Mut" }, { - "mutability": "Not", - "span": 108 + "mutability": "Not" }, { - "mutability": "Not", - "span": 109 + "mutability": "Not" }, { - "mutability": "Mut", - "span": 92 + "mutability": "Not" }, { - "mutability": "Mut", - "span": 97 + "mutability": "Not" }, { - "mutability": "Mut", - "span": 95 + "mutability": "Mut" }, { - "mutability": "Mut", - "span": 96 + "mutability": "Not" }, { - "mutability": "Not", - "span": 98 - }, - { - "mutability": "Not", - "span": 99 - }, - { - "mutability": "Mut", - "span": 94 - }, - { - "mutability": "Mut", - "span": 100 - }, - { - "mutability": "Mut", - "span": 101 - }, - { - "mutability": "Not", - "span": 110 - }, - { - "mutability": "Not", - "span": 104 - }, - { - "mutability": "Mut", - "span": 106 + "mutability": "Not" } ], - "span": 111, "spread_arg": null, "var_debug_info": [ { - "argument_index": null, + "argument_index": 1, "composite": null, - "name": "a", + "name": "main", "source_info": { - "scope": 1, - "span": 108 + "scope": 0 }, "value": { "Place": { @@ -707,12 +263,11 @@ } }, { - "argument_index": null, + "argument_index": 2, "composite": null, - "name": "b", + "name": "argc", "source_info": { - "scope": 2, - "span": 109 + "scope": 0 }, "value": { "Place": { @@ -722,127 +277,39 @@ } }, { - "argument_index": null, - "composite": null, - "name": "left_val", - "source_info": { - "scope": 3, - "span": 98 - }, - "value": { - "Place": { - "local": 7, - "projection": [] - } - } - }, - { - "argument_index": null, + "argument_index": 3, "composite": null, - "name": "right_val", + "name": "argv", "source_info": { - "scope": 3, - "span": 99 + "scope": 0 }, "value": { "Place": { - "local": 8, + "local": 3, "projection": [] } } }, { - "argument_index": null, + "argument_index": 4, "composite": null, - "name": "kind", + "name": "sigpipe", "source_info": { - "scope": 4, - "span": 110 + "scope": 0 }, "value": { "Place": { - "local": 12, + "local": 4, "projection": [] } } } ] }, - "id": 9, - "name": "main" - } - }, - "symbol_name": "_ZN9assert_eq4main17h" - }, - { - "details": null, - "mono_item_kind": { - "MonoItemFn": { - "body": { - "arg_count": 1, - "blocks": [ - { - "statements": [], - "terminator": { - "kind": "Return", - "span": 74 - } - } - ], - "locals": [ - { - "mutability": "Mut", - "span": 74 - }, - { - "mutability": "Not", - "span": 74 - } - ], - "span": 74, - "spread_arg": null, - "var_debug_info": [] - }, - "id": 6, - "name": "std::ptr::drop_in_place::<&i32>" - } - }, - "symbol_name": "_ZN4core3ptr28drop_in_place$LT$$RF$i32$GT$17h" - }, - { - "details": null, - "mono_item_kind": { - "MonoItemFn": { - "body": { - "arg_count": 1, - "blocks": [ - { - "statements": [], - "terminator": { - "kind": "Return", - "span": 74 - } - } - ], - "locals": [ - { - "mutability": "Mut", - "span": 74 - }, - { - "mutability": "Not", - "span": 74 - } - ], - "span": 74, - "spread_arg": null, - "var_debug_info": [] - }, - "id": 6, - "name": "std::ptr::drop_in_place::<{closure@std::rt::lang_start<()>::{closure#0}}>" + "name": "std::rt::lang_start::<()>" } }, - "symbol_name": "_ZN4core3ptr85drop_in_place$LT$std..rt..lang_start$LT$$LP$$RP$$GT$..$u7b$$u7b$closure$u7d$$u7d$$GT$17h" + "symbol_name": "_ZN3std2rt10lang_start17h" }, { "details": null, @@ -852,63 +319,94 @@ "arg_count": 1, "blocks": [ { - "statements": [], + "statements": [ + { + "kind": { + "StorageLive": 2 + } + }, + { + "kind": { + "StorageLive": 3 + } + }, + { + "kind": { + "StorageLive": 4 + } + }, + { + "kind": { + "Assign": [ + { + "local": 4, + "projection": [] + }, + { + "Use": { + "Copy": { + "local": 1, + "projection": [ + "Deref", + { + "Field": [ + 0, + 0 + ] + } + ] + } + } + } + ] + } + } + ], "terminator": { "kind": { "Call": { "args": [ { "Move": { - "local": 1, + "local": 4, "projection": [] } - }, - { - "Constant": { - "const_": { - "id": 4, - "kind": "ZeroSized" - }, - "span": 32, - "user_ty": null - } } ], "destination": { - "local": 0, + "local": 3, "projection": [] }, "func": { "Constant": { "const_": { - "id": 3, "kind": "ZeroSized" }, - "span": 31, "user_ty": null } }, "target": 1, "unwind": "Continue" } - }, - "span": 33 + } } }, { - "statements": [], + "statements": [ + { + "kind": { + "StorageDead": 4 + } + } + ], "terminator": { "kind": { "Call": { "args": [ { - "Constant": { - "const_": { - "id": 4, - "kind": "ZeroSized" - }, - "span": 32, - "user_ty": null + "Move": { + "local": 3, + "projection": [] } } ], @@ -919,101 +417,162 @@ "func": { "Constant": { "const_": { - "id": 5, "kind": "ZeroSized" }, - "span": 34, "user_ty": null } }, "target": 2, - "unwind": "Unreachable" + "unwind": "Continue" } - }, - "span": 35 + } } }, { - "statements": [], + "statements": [ + { + "kind": { + "StorageDead": 3 + } + }, + { + "kind": { + "StorageLive": 5 + } + }, + { + "kind": { + "Assign": [ + { + "local": 5, + "projection": [] + }, + { + "Use": { + "Copy": { + "local": 2, + "projection": [ + { + "Field": [ + 0, + 0 + ] + }, + { + "Field": [ + 0, + 0 + ] + } + ] + } + } + } + ] + } + }, + { + "kind": { + "Assign": [ + { + "local": 0, + "projection": [] + }, + { + "Cast": [ + "IntToInt", + { + "Move": { + "local": 5, + "projection": [] + } + }, + 0 + ] + } + ] + } + }, + { + "kind": { + "StorageDead": 5 + } + }, + { + "kind": { + "StorageDead": 2 + } + } + ], "terminator": { - "kind": "Return", - "span": 36 + "kind": "Return" } } ], "locals": [ { - "mutability": "Mut", - "span": 37 + "mutability": "Mut" }, { - "mutability": "Not", - "span": 38 + "mutability": "Mut" }, { - "mutability": "Not", - "span": 39 - } - ], - "span": 42, - "spread_arg": null, - "var_debug_info": [ + "mutability": "Mut" + }, { - "argument_index": 1, - "composite": null, - "name": "f", - "source_info": { - "scope": 0, - "span": 38 - }, - "value": { - "Place": { - "local": 1, - "projection": [] - } - } + "mutability": "Mut" + }, + { + "mutability": "Mut" }, + { + "mutability": "Mut" + } + ], + "spread_arg": null, + "var_debug_info": [ { "argument_index": null, "composite": null, - "name": "result", + "name": "main", "source_info": { - "scope": 1, - "span": 40 + "scope": 0 }, "value": { "Place": { - "local": 0, - "projection": [] + "local": 1, + "projection": [ + "Deref", + { + "Field": [ + 0, + 0 + ] + } + ] } } }, { "argument_index": 1, "composite": null, - "name": "dummy", + "name": "self", "source_info": { - "scope": 2, - "span": 41 + "scope": 1 }, "value": { - "Const": { - "const_": { - "id": 4, - "kind": "ZeroSized" - }, - "span": 32, - "user_ty": null + "Place": { + "local": 2, + "projection": [] } } } ] }, - "id": 2, - "name": "std::sys::backtrace::__rust_begin_short_backtrace::" + "name": "std::rt::lang_start::<()>::{closure#0}" } }, - "symbol_name": "_ZN3std3sys9backtrace28__rust_begin_short_backtrace17h" + "symbol_name": "_ZN3std2rt10lang_start28_$u7b$$u7b$closure$u7d$$u7d$17h" }, { "details": null, @@ -1023,439 +582,219 @@ "arg_count": 1, "blocks": [ { - "statements": [ - { - "kind": { - "Assign": [ + "statements": [], + "terminator": { + "kind": { + "Call": { + "args": [ { - "local": 0, - "projection": [] + "Move": { + "local": 1, + "projection": [] + } }, { - "Use": { - "Constant": { - "const_": { - "id": 15, - "kind": { - "Allocated": { - "align": 1, - "bytes": [ - 0 - ], - "mutability": "Mut", - "provenance": { - "ptrs": [] - } - } - } - }, - "span": 86, - "user_ty": null - } + "Constant": { + "const_": { + "kind": "ZeroSized" + }, + "user_ty": null } } - ] - }, - "span": 86 + ], + "destination": { + "local": 0, + "projection": [] + }, + "func": { + "Constant": { + "const_": { + "kind": "ZeroSized" + }, + "user_ty": null + } + }, + "target": 1, + "unwind": "Continue" + } } - ], + } + }, + { + "statements": [], + "terminator": { + "kind": { + "Call": { + "args": [ + { + "Constant": { + "const_": { + "kind": "ZeroSized" + }, + "user_ty": null + } + } + ], + "destination": { + "local": 2, + "projection": [] + }, + "func": { + "Constant": { + "const_": { + "kind": "ZeroSized" + }, + "user_ty": null + } + }, + "target": 2, + "unwind": "Unreachable" + } + } + } + }, + { + "statements": [], "terminator": { - "kind": "Return", - "span": 85 + "kind": "Return" } } ], "locals": [ { - "mutability": "Mut", - "span": 87 + "mutability": "Mut" + }, + { + "mutability": "Not" }, { - "mutability": "Not", - "span": 88 + "mutability": "Not" } ], - "span": 89, "spread_arg": null, "var_debug_info": [ { "argument_index": 1, "composite": null, - "name": "self", + "name": "f", + "source_info": { + "scope": 0 + }, + "value": { + "Place": { + "local": 1, + "projection": [] + } + } + }, + { + "argument_index": null, + "composite": null, + "name": "result", + "source_info": { + "scope": 1 + }, + "value": { + "Place": { + "local": 0, + "projection": [] + } + } + }, + { + "argument_index": 1, + "composite": null, + "name": "dummy", "source_info": { - "scope": 0, - "span": 88 + "scope": 2 }, "value": { "Const": { "const_": { - "id": 4, "kind": "ZeroSized" }, - "span": 32, "user_ty": null } } } ] }, - "id": 8, - "name": "<() as std::process::Termination>::report" + "name": "std::sys::backtrace::__rust_begin_short_backtrace::" } }, - "symbol_name": "_ZN54_$LT$$LP$$RP$$u20$as$u20$std..process..Termination$GT$6report17h" + "symbol_name": "_ZN3std3sys9backtrace28__rust_begin_short_backtrace17h" }, { "details": null, "mono_item_kind": { "MonoItemFn": { "body": { - "arg_count": 1, + "arg_count": 2, "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 - } - ], + "statements": [], "terminator": { "kind": { "Call": { "args": [ { "Move": { - "local": 4, + "local": 1, + "projection": [ + "Deref" + ] + } + }, + { + "Move": { + "local": 2, "projection": [] } } ], "destination": { - "local": 3, + "local": 0, "projection": [] }, "func": { "Constant": { "const_": { - "id": 1, "kind": "ZeroSized" }, - "span": 14, "user_ty": null } }, "target": 1, "unwind": "Continue" } - }, - "span": 15 + } } }, { - "statements": [ - { - "kind": { - "StorageDead": 4 - }, - "span": 19 - } - ], + "statements": [], "terminator": { - "kind": { - "Call": { - "args": [ - { - "Move": { - "local": 3, - "projection": [] - } - } - ], - "destination": { - "local": 2, - "projection": [] - }, - "func": { - "Constant": { - "const_": { - "id": 2, - "kind": "ZeroSized" - }, - "span": 18, - "user_ty": null - } - }, - "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 + "kind": "Return" } } ], "locals": [ { - "mutability": "Mut", - "span": 28 - }, - { - "mutability": "Mut", - "span": 3 - }, - { - "mutability": "Mut", - "span": 16 - }, - { - "mutability": "Mut", - "span": 15 + "mutability": "Mut" }, { - "mutability": "Mut", - "span": 17 + "mutability": "Not" }, { - "mutability": "Mut", - "span": 22 - }, - { - "mutability": "Mut", - "span": 23 + "mutability": "Not" } ], - "span": 3, - "spread_arg": null, - "var_debug_info": [ - { - "argument_index": null, - "composite": null, - "name": "main", - "source_info": { - "scope": 0, - "span": 9 - }, - "value": { - "Place": { - "local": 1, - "projection": [ - "Deref", - { - "Field": [ - 0, - 7 - ] - } - ] - } - } - }, - { - "argument_index": 1, - "composite": null, - "name": "self", - "source_info": { - "scope": 1, - "span": 29 - }, - "value": { - "Place": { - "local": 2, - "projection": [] - } - } - }, - { - "argument_index": 1, - "composite": null, - "name": "self", - "source_info": { - "scope": 2, - "span": 30 - }, - "value": { - "Place": { - "local": 5, - "projection": [] - } - } - } - ] + "spread_arg": 2, + "var_debug_info": [] }, - "id": 1, - "name": "std::rt::lang_start::<()>::{closure#0}" + "name": "<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once" } }, - "symbol_name": "_ZN3std2rt10lang_start28_$u7b$$u7b$closure$u7d$$u7d$17h" + "symbol_name": "_ZN4core3ops8function6FnOnce40call_once$u7b$$u7b$vtable.shim$u7d$$u7d$17h" }, { "details": null, @@ -1483,123 +822,35 @@ "target": 1, "unwind": "Continue" } - }, - "span": 73 + } } }, { "statements": [], "terminator": { - "kind": "Return", - "span": 73 + "kind": "Return" } } ], "locals": [ { - "mutability": "Mut", - "span": 73 + "mutability": "Mut" }, { - "mutability": "Not", - "span": 73 + "mutability": "Not" }, { - "mutability": "Not", - "span": 73 + "mutability": "Not" } ], - "span": 73, "spread_arg": 2, "var_debug_info": [] }, - "id": 5, "name": ">::call_once" } }, "symbol_name": "_ZN4core3ops8function6FnOnce9call_once17h" }, - { - "details": null, - "mono_item_kind": { - "MonoItemFn": { - "body": { - "arg_count": 2, - "blocks": [ - { - "statements": [], - "terminator": { - "kind": { - "Call": { - "args": [ - { - "Move": { - "local": 1, - "projection": [ - "Deref" - ] - } - }, - { - "Move": { - "local": 2, - "projection": [] - } - } - ], - "destination": { - "local": 0, - "projection": [] - }, - "func": { - "Constant": { - "const_": { - "id": 12, - "kind": "ZeroSized" - }, - "span": 73, - "user_ty": null - } - }, - "target": 1, - "unwind": "Continue" - } - }, - "span": 73 - } - }, - { - "statements": [], - "terminator": { - "kind": "Return", - "span": 73 - } - } - ], - "locals": [ - { - "mutability": "Mut", - "span": 73 - }, - { - "mutability": "Not", - "span": 73 - }, - { - "mutability": "Not", - "span": 73 - } - ], - "span": 73, - "spread_arg": 2, - "var_debug_info": [] - }, - "id": 5, - "name": "<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once" - } - }, - "symbol_name": "_ZN4core3ops8function6FnOnce40call_once$u7b$$u7b$vtable.shim$u7d$$u7d$17h" - }, { "details": null, "mono_item_kind": { @@ -1633,8 +884,7 @@ ] } ] - }, - "span": 73 + } } ], "terminator": { @@ -1661,10 +911,8 @@ "func": { "Constant": { "const_": { - "id": 13, "kind": "ZeroSized" }, - "span": 73, "user_ty": null } }, @@ -1673,8 +921,7 @@ "Cleanup": 3 } } - }, - "span": 73 + } } }, { @@ -1689,15 +936,13 @@ "target": 2, "unwind": "Continue" } - }, - "span": 73 + } } }, { "statements": [], "terminator": { - "kind": "Return", - "span": 73 + "kind": "Return" } }, { @@ -1712,41 +957,33 @@ "target": 4, "unwind": "Terminate" } - }, - "span": 73 + } } }, { "statements": [], "terminator": { - "kind": "Resume", - "span": 73 + "kind": "Resume" } } ], "locals": [ { - "mutability": "Mut", - "span": 73 + "mutability": "Mut" }, { - "mutability": "Not", - "span": 73 + "mutability": "Not" }, { - "mutability": "Not", - "span": 73 + "mutability": "Not" }, { - "mutability": "Not", - "span": 73 + "mutability": "Not" } ], - "span": 73, "spread_arg": 2, "var_debug_info": [] }, - "id": 5, "name": "<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once" } }, @@ -1757,7 +994,37 @@ "mono_item_kind": { "MonoItemFn": { "body": { - "arg_count": 2, + "arg_count": 1, + "blocks": [ + { + "statements": [], + "terminator": { + "kind": "Return" + } + } + ], + "locals": [ + { + "mutability": "Mut" + }, + { + "mutability": "Not" + } + ], + "spread_arg": null, + "var_debug_info": [] + }, + "name": "std::ptr::drop_in_place::<{closure@std::rt::lang_start<()>::{closure#0}}>" + } + }, + "symbol_name": "_ZN4core3ptr85drop_in_place$LT$std..rt..lang_start$LT$$LP$$RP$$GT$..$u7b$$u7b$closure$u7d$$u7d$$GT$17h" + }, + { + "details": null, + "mono_item_kind": { + "MonoItemFn": { + "body": { + "arg_count": 1, "blocks": [ { "statements": [ @@ -1765,176 +1032,97 @@ "kind": { "Assign": [ { - "local": 3, + "local": 0, "projection": [] }, { "Use": { - "Copy": { - "local": 1, - "projection": [ - "Deref" - ] + "Constant": { + "const_": { + "kind": { + "Allocated": { + "align": 1, + "bytes": [ + 0 + ], + "mutability": "Mut", + "provenance": { + "ptrs": [] + } + } + } + }, + "user_ty": null } } } ] - }, - "span": 45 + } } ], "terminator": { - "kind": { - "Call": { - "args": [ - { - "Move": { - "local": 3, - "projection": [] - } - }, - { - "Move": { - "local": 2, - "projection": [] - } - } - ], - "destination": { - "local": 0, - "projection": [] - }, - "func": { - "Constant": { - "const_": { - "id": 6, - "kind": "ZeroSized" - }, - "span": 43, - "user_ty": null - } - }, - "target": 1, - "unwind": "Continue" - } - }, - "span": 44 - } - }, - { - "statements": [], - "terminator": { - "kind": "Return", - "span": 46 + "kind": "Return" } } ], "locals": [ { - "mutability": "Mut", - "span": 47 - }, - { - "mutability": "Not", - "span": 48 - }, - { - "mutability": "Not", - "span": 49 + "mutability": "Mut" }, { - "mutability": "Mut", - "span": 48 + "mutability": "Not" } ], - "span": 50, "spread_arg": null, - "var_debug_info": [ - { - "argument_index": 1, - "composite": null, - "name": "self", - "source_info": { - "scope": 0, - "span": 48 - }, - "value": { - "Place": { - "local": 1, - "projection": [] - } - } - }, - { - "argument_index": 2, - "composite": null, - "name": "f", - "source_info": { - "scope": 0, - "span": 49 - }, - "value": { - "Place": { - "local": 2, - "projection": [] - } - } - } - ] + "var_debug_info": [] }, - "id": 3, - "name": "<&i32 as std::fmt::Debug>::fmt" + "name": "<() as std::process::Termination>::report" } }, - "symbol_name": "_ZN42_$LT$$RF$T$u20$as$u20$core..fmt..Debug$GT$3fmt17h" + "symbol_name": "_ZN54_$LT$$LP$$RP$$u20$as$u20$std..process..Termination$GT$6report17h" }, { "details": null, "mono_item_kind": { "MonoItemFn": { "body": { - "arg_count": 2, + "arg_count": 0, "blocks": [ { "statements": [ - { - "kind": { - "StorageLive": 3 - }, - "span": 52 - }, - { - "kind": { - "StorageLive": 4 - }, - "span": 53 - }, { "kind": { "Assign": [ { - "local": 4, + "local": 1, "projection": [] }, { "Use": { - "Copy": { - "local": 2, - "projection": [ - "Deref", - { - "Field": [ - 0, - 26 - ] + "Constant": { + "const_": { + "kind": { + "Allocated": { + "align": 4, + "bytes": [ + 42, + 0, + 0, + 0 + ], + "mutability": "Mut", + "provenance": { + "ptrs": [] + } + } } - ] + }, + "user_ty": null } } } ] - }, - "span": 53 + } }, { "kind": { @@ -1944,23 +1132,38 @@ "projection": [] }, { - "BinaryOp": [ - "BitAnd", + "CheckedBinaryOp": [ + "Add", { - "Move": { - "local": 4, - "projection": [] + "Constant": { + "const_": { + "kind": { + "Allocated": { + "align": 4, + "bytes": [ + 3, + 0, + 0, + 0 + ], + "mutability": "Mut", + "provenance": { + "ptrs": [] + } + } + } + }, + "user_ty": null } }, { "Constant": { "const_": { - "id": 7, "kind": { "Allocated": { "align": 4, "bytes": [ - 16, + 39, 0, 0, 0 @@ -1972,504 +1175,119 @@ } } }, - "span": 32, "user_ty": null } } ] } ] - }, - "span": 52 - }, - { - "kind": { - "StorageDead": 4 - }, - "span": 54 + } } ], "terminator": { "kind": { - "SwitchInt": { - "discr": { + "Assert": { + "cond": { "Move": { "local": 3, - "projection": [] - } - }, - "targets": { - "branches": [ - [ - 0, - 2 + "projection": [ + { + "Field": [ + 1, + 0 + ] + } ] - ], - "otherwise": 1 - } - } - }, - "span": 51 - } - }, - { - "statements": [ - { - "kind": { - "StorageDead": 3 - }, - "span": 51 - } - ], - "terminator": { - "kind": { - "Call": { - "args": [ - { - "Move": { - "local": 1, - "projection": [] - } - }, - { - "Move": { - "local": 2, - "projection": [] - } } - ], - "destination": { - "local": 0, - "projection": [] }, - "func": { - "Constant": { - "const_": { - "id": 8, - "kind": "ZeroSized" - }, - "span": 55, - "user_ty": null - } - }, - "target": 6, - "unwind": "Continue" - } - }, - "span": 56 - } - }, - { - "statements": [ - { - "kind": { - "StorageDead": 3 - }, - "span": 51 - }, - { - "kind": { - "StorageLive": 5 - }, - "span": 58 - }, - { - "kind": { - "StorageLive": 6 - }, - "span": 59 - }, - { - "kind": { - "Assign": [ - { - "local": 6, - "projection": [] - }, - { - "Use": { - "Copy": { - "local": 2, - "projection": [ - "Deref", - { - "Field": [ - 0, - 26 - ] + "expected": false, + "msg": { + "Overflow": [ + "Add", + { + "Constant": { + "const_": { + "kind": { + "Allocated": { + "align": 4, + "bytes": [ + 3, + 0, + 0, + 0 + ], + "mutability": "Mut", + "provenance": { + "ptrs": [] + } + } } - ] + }, + "user_ty": null } - } - } - ] - }, - "span": 59 - }, - { - "kind": { - "Assign": [ - { - "local": 5, - "projection": [] - }, - { - "BinaryOp": [ - "BitAnd", - { - "Move": { - "local": 6, - "projection": [] - } - }, - { - "Constant": { - "const_": { - "id": 9, - "kind": { - "Allocated": { - "align": 4, - "bytes": [ - 32, - 0, - 0, - 0 - ], - "mutability": "Mut", - "provenance": { - "ptrs": [] - } + }, + { + "Constant": { + "const_": { + "kind": { + "Allocated": { + "align": 4, + "bytes": [ + 39, + 0, + 0, + 0 + ], + "mutability": "Mut", + "provenance": { + "ptrs": [] } } - }, - "span": 32, - "user_ty": null - } + } + }, + "user_ty": null } - ] - } - ] - }, - "span": 58 - }, - { - "kind": { - "StorageDead": 6 - }, - "span": 60 - } - ], - "terminator": { - "kind": { - "SwitchInt": { - "discr": { - "Move": { - "local": 5, - "projection": [] - } - }, - "targets": { - "branches": [ - [ - 0, - 4 - ] - ], - "otherwise": 3 - } - } - }, - "span": 57 - } - }, - { - "statements": [ - { - "kind": { - "StorageDead": 5 - }, - "span": 57 - } - ], - "terminator": { - "kind": { - "Call": { - "args": [ - { - "Move": { - "local": 1, - "projection": [] - } - }, - { - "Move": { - "local": 2, - "projection": [] - } - } - ], - "destination": { - "local": 0, - "projection": [] - }, - "func": { - "Constant": { - "const_": { - "id": 10, - "kind": "ZeroSized" - }, - "span": 61, - "user_ty": null - } - }, - "target": 5, - "unwind": "Continue" - } - }, - "span": 62 - } - }, - { - "statements": [ - { - "kind": { - "StorageDead": 5 - }, - "span": 57 - } - ], - "terminator": { - "kind": { - "Call": { - "args": [ - { - "Move": { - "local": 1, - "projection": [] - } - }, - { - "Move": { - "local": 2, - "projection": [] } - } - ], - "destination": { - "local": 0, - "projection": [] - }, - "func": { - "Constant": { - "const_": { - "id": 11, - "kind": "ZeroSized" - }, - "span": 63, - "user_ty": null - } + ] }, - "target": 5, - "unwind": "Continue" - } - }, - "span": 64 - } - }, - { - "statements": [], - "terminator": { - "kind": { - "Goto": { - "target": 6 - } - }, - "span": 65 - } - }, - { - "statements": [], - "terminator": { - "kind": "Return", - "span": 66 - } - } - ], - "locals": [ - { - "mutability": "Mut", - "span": 67 - }, - { - "mutability": "Not", - "span": 68 - }, - { - "mutability": "Not", - "span": 69 - }, - { - "mutability": "Mut", - "span": 52 - }, - { - "mutability": "Mut", - "span": 53 - }, - { - "mutability": "Mut", - "span": 58 - }, - { - "mutability": "Mut", - "span": 59 - } - ], - "span": 72, - "spread_arg": null, - "var_debug_info": [ - { - "argument_index": 1, - "composite": null, - "name": "self", - "source_info": { - "scope": 0, - "span": 68 - }, - "value": { - "Place": { - "local": 1, - "projection": [] - } - } - }, - { - "argument_index": 2, - "composite": null, - "name": "f", - "source_info": { - "scope": 0, - "span": 69 - }, - "value": { - "Place": { - "local": 2, - "projection": [] - } - } - }, - { - "argument_index": 1, - "composite": null, - "name": "self", - "source_info": { - "scope": 1, - "span": 70 - }, - "value": { - "Place": { - "local": 2, - "projection": [] - } - } - }, - { - "argument_index": 1, - "composite": null, - "name": "self", - "source_info": { - "scope": 2, - "span": 71 - }, - "value": { - "Place": { - "local": 2, - "projection": [] - } - } - } - ] - }, - "id": 4, - "name": "core::fmt::num::::fmt" - } - }, - "symbol_name": "_ZN4core3fmt3num50_$LT$impl$u20$core..fmt..Debug$u20$for$u20$i32$GT$3fmt17h" - }, - { - "details": null, - "mono_item_kind": { - "MonoItemFn": { - "body": { - "arg_count": 4, - "blocks": [ - { - "statements": [ - { - "kind": { - "StorageLive": 5 - }, - "span": 1 - }, - { - "kind": { - "StorageLive": 6 - }, - "span": 2 - }, - { - "kind": { - "StorageLive": 8 - }, - "span": 3 - }, + "target": 1, + "unwind": "Continue" + } + } + } + }, + { + "statements": [ { "kind": { "Assign": [ { - "local": 8, + "local": 2, "projection": [] }, { - "Aggregate": [ - { - "Closure": [ - 1, - [ - { - "Type": 1 - }, - { - "Type": 2 - }, - { - "Type": 3 - }, - { - "Type": 4 - } - ] - ] - }, - [ - { - "Copy": { - "local": 1, - "projection": [] + "Use": { + "Move": { + "local": 3, + "projection": [ + { + "Field": [ + 0, + 0 + ] } - } - ] - ] + ] + } + } } ] - }, - "span": 3 + } }, { "kind": { "Assign": [ { - "local": 7, + "local": 5, "projection": [] }, { @@ -2479,14 +1297,13 @@ }, "Shared", { - "local": 8, + "local": 2, "projection": [] } ] } ] - }, - "span": 2 + } }, { "kind": { @@ -2496,370 +1313,248 @@ "projection": [] }, { - "Cast": [ + "Ref": [ { - "PointerCoercion": "Unsize" + "kind": "ReErased" }, + "Shared", { - "Copy": { - "local": 7, - "projection": [] - } - }, - 5 + "local": 1, + "projection": [] + } ] } ] - }, - "span": 2 - } - ], - "terminator": { - "kind": { - "Call": { - "args": [ - { - "Move": { - "local": 6, - "projection": [] - } - }, - { - "Move": { - "local": 2, - "projection": [] - } - }, - { - "Move": { - "local": 3, - "projection": [] - } - }, - { - "Move": { - "local": 4, - "projection": [] - } - } - ], - "destination": { - "local": 5, - "projection": [] - }, - "func": { - "Constant": { - "const_": { - "id": 0, - "kind": "ZeroSized" - }, - "span": 0, - "user_ty": null - } - }, - "target": 1, - "unwind": "Continue" } }, - "span": 1 - } - }, - { - "statements": [ - { - "kind": { - "StorageDead": 6 - }, - "span": 5 - }, { "kind": { "Assign": [ { - "local": 0, + "local": 4, "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": [ - { - "mutability": "Mut", - "span": 8 - }, - { - "mutability": "Not", - "span": 9 - }, - { - "mutability": "Not", - "span": 10 - }, - { - "mutability": "Not", - "span": 11 - }, - { - "mutability": "Not", - "span": 12 - }, - { - "mutability": "Mut", - "span": 1 - }, - { - "mutability": "Mut", - "span": 2 - }, - { - "mutability": "Not", - "span": 2 - }, - { - "mutability": "Not", - "span": 3 - } - ], - "span": 13, - "spread_arg": null, - "var_debug_info": [ - { - "argument_index": 1, - "composite": null, - "name": "main", - "source_info": { - "scope": 0, - "span": 9 - }, - "value": { - "Place": { - "local": 1, - "projection": [] - } - } - }, - { - "argument_index": 2, - "composite": null, - "name": "argc", - "source_info": { - "scope": 0, - "span": 10 - }, - "value": { - "Place": { - "local": 2, - "projection": [] - } - } - }, - { - "argument_index": 3, - "composite": null, - "name": "argv", - "source_info": { - "scope": 0, - "span": 11 - }, - "value": { - "Place": { - "local": 3, - "projection": [] - } - } - }, - { - "argument_index": 4, - "composite": null, - "name": "sigpipe", - "source_info": { - "scope": 0, - "span": 12 - }, - "value": { - "Place": { - "local": 4, - "projection": [] - } - } - }, - { - "argument_index": null, - "composite": null, - "name": "v", - "source_info": { - "scope": 1, - "span": 6 - }, - "value": { - "Place": { - "local": 0, - "projection": [] - } - } - } - ] - }, - "id": 0, - "name": "std::rt::lang_start::<()>" - } - }, - "symbol_name": "_ZN3std2rt10lang_start17h" - }, - { - "details": null, - "mono_item_kind": { - "MonoItemFn": { - "body": { - "arg_count": 4, - "blocks": [ - { - "statements": [ + "Aggregate": [ + "Tuple", + [ + { + "Move": { + "local": 5, + "projection": [] + } + }, + { + "Move": { + "local": 6, + "projection": [] + } + } + ] + ] + } + ] + } + }, { "kind": { - "StorageLive": 5 - }, - "span": 77 + "Assign": [ + { + "local": 7, + "projection": [] + }, + { + "Use": { + "Copy": { + "local": 4, + "projection": [ + { + "Field": [ + 0, + 0 + ] + } + ] + } + } + } + ] + } }, { "kind": { "Assign": [ { - "local": 6, + "local": 8, "projection": [] }, { - "Ref": [ - { - "kind": "ReErased" - }, - "Shared", - { - "local": 2, - "projection": [] + "Use": { + "Copy": { + "local": 4, + "projection": [ + { + "Field": [ + 1, + 0 + ] + } + ] } - ] + } } ] - }, - "span": 77 + } }, { "kind": { "Assign": [ { - "local": 5, + "local": 10, "projection": [] }, { - "Cast": [ - { - "PointerCoercion": "Unsize" - }, - { - "Copy": { - "local": 6, - "projection": [] - } - }, - 36 - ] + "Use": { + "Copy": { + "local": 7, + "projection": [ + "Deref" + ] + } + } } ] - }, - "span": 77 + } }, { "kind": { - "StorageLive": 7 - }, - "span": 78 + "Assign": [ + { + "local": 11, + "projection": [] + }, + { + "Use": { + "Copy": { + "local": 8, + "projection": [ + "Deref" + ] + } + } + } + ] + } }, { "kind": { "Assign": [ { - "local": 8, + "local": 9, "projection": [] }, { - "Ref": [ + "BinaryOp": [ + "Eq", { - "kind": "ReErased" + "Move": { + "local": 10, + "projection": [] + } }, - "Shared", { - "local": 3, - "projection": [] + "Move": { + "local": 11, + "projection": [] + } } ] } ] - }, - "span": 78 - }, + } + } + ], + "terminator": { + "kind": { + "SwitchInt": { + "discr": { + "Move": { + "local": 9, + "projection": [] + } + }, + "targets": { + "branches": [ + [ + 0, + 3 + ] + ], + "otherwise": 2 + } + } + } + } + }, + { + "statements": [], + "terminator": { + "kind": "Return" + } + }, + { + "statements": [ { "kind": { "Assign": [ { - "local": 7, + "local": 12, "projection": [] }, { - "Cast": [ + "Aggregate": [ { - "PointerCoercion": "Unsize" + "Adt": [ + 0, + 0, + [], + null, + null + ] }, + [] + ] + } + ] + } + }, + { + "kind": { + "Assign": [ + { + "local": 14, + "projection": [] + }, + { + "Aggregate": [ { - "Copy": { - "local": 8, - "projection": [] - } + "Adt": [ + 0, + 0, + [ + { + "Type": 0 + } + ], + null, + null + ] }, - 36 + [] ] } ] - }, - "span": 78 + } } ], "terminator": { @@ -2868,99 +1563,103 @@ "args": [ { "Move": { - "local": 1, + "local": 12, "projection": [] } }, { - "Move": { - "local": 5, + "Copy": { + "local": 7, "projection": [] } }, { - "Move": { - "local": 7, + "Copy": { + "local": 8, "projection": [] } }, { "Move": { - "local": 4, + "local": 14, "projection": [] } } ], "destination": { - "local": 0, + "local": 13, "projection": [] }, "func": { "Constant": { "const_": { - "id": 14, "kind": "ZeroSized" }, - "span": 75, "user_ty": null } }, "target": null, "unwind": "Continue" } - }, - "span": 76 + } } } ], "locals": [ { - "mutability": "Mut", - "span": 79 + "mutability": "Mut" + }, + { + "mutability": "Not" + }, + { + "mutability": "Not" + }, + { + "mutability": "Mut" + }, + { + "mutability": "Mut" }, { - "mutability": "Not", - "span": 80 + "mutability": "Mut" }, { - "mutability": "Not", - "span": 81 + "mutability": "Mut" }, { - "mutability": "Not", - "span": 82 + "mutability": "Not" }, { - "mutability": "Not", - "span": 83 + "mutability": "Not" }, { - "mutability": "Mut", - "span": 77 + "mutability": "Mut" }, { - "mutability": "Not", - "span": 77 + "mutability": "Mut" }, { - "mutability": "Mut", - "span": 78 + "mutability": "Mut" }, { - "mutability": "Not", - "span": 78 + "mutability": "Not" + }, + { + "mutability": "Not" + }, + { + "mutability": "Mut" } ], - "span": 84, "spread_arg": null, "var_debug_info": [ { - "argument_index": 1, + "argument_index": null, "composite": null, - "name": "kind", + "name": "a", "source_info": { - "scope": 0, - "span": 80 + "scope": 1 }, "value": { "Place": { @@ -2970,12 +1669,11 @@ } }, { - "argument_index": 2, + "argument_index": null, "composite": null, - "name": "left", + "name": "b", "source_info": { - "scope": 0, - "span": 81 + "scope": 2 }, "value": { "Place": { @@ -2985,42 +1683,53 @@ } }, { - "argument_index": 3, + "argument_index": null, "composite": null, - "name": "right", + "name": "left_val", "source_info": { - "scope": 0, - "span": 82 + "scope": 3 }, "value": { "Place": { - "local": 3, + "local": 7, "projection": [] } } }, { - "argument_index": 4, + "argument_index": null, + "composite": null, + "name": "right_val", + "source_info": { + "scope": 3 + }, + "value": { + "Place": { + "local": 8, + "projection": [] + } + } + }, + { + "argument_index": null, "composite": null, - "name": "args", + "name": "kind", "source_info": { - "scope": 0, - "span": 83 + "scope": 4 }, "value": { "Place": { - "local": 4, + "local": 12, "projection": [] } } } ] }, - "id": 7, - "name": "core::panicking::assert_failed::" + "name": "main" } }, - "symbol_name": "_ZN4core9panicking13assert_failed17h" + "symbol_name": "_ZN9assert_eq4main17h" } ], "types": [ @@ -3686,6 +2395,135 @@ } } ], + [ + { + "EnumType": { + "discriminants": [ + 0, + 1, + 2 + ], + "fields": "elided", + "layout": { + "abi": { + "Scalar": { + "Initialized": { + "valid_range": { + "end": 2, + "start": 0 + }, + "value": { + "Int": { + "length": "I8", + "signed": false + } + } + } + } + }, + "abi_align": 1, + "fields": { + "Arbitrary": { + "offsets": [ + { + "num_bits": 0 + } + ] + } + }, + "size": { + "num_bits": 8 + }, + "variants": { + "Multiple": { + "tag": { + "Initialized": { + "valid_range": { + "end": 2, + "start": 0 + }, + "value": { + "Int": { + "length": "I8", + "signed": false + } + } + } + }, + "tag_encoding": "Direct", + "tag_field": 0, + "variants": [ + { + "abi": { + "Aggregate": { + "sized": true + } + }, + "abi_align": 1, + "fields": { + "Arbitrary": { + "offsets": [] + } + }, + "size": { + "num_bits": 8 + }, + "variants": { + "Single": { + "index": 0 + } + } + }, + { + "abi": { + "Aggregate": { + "sized": true + } + }, + "abi_align": 1, + "fields": { + "Arbitrary": { + "offsets": [] + } + }, + "size": { + "num_bits": 8 + }, + "variants": { + "Single": { + "index": 1 + } + } + }, + { + "abi": { + "Aggregate": { + "sized": true + } + }, + "abi_align": 1, + "fields": { + "Arbitrary": { + "offsets": [] + } + }, + "size": { + "num_bits": 8 + }, + "variants": { + "Single": { + "index": 2 + } + } + } + ] + } + } + }, + "name": "std::fmt::Alignment" + } + } + ], [ { "EnumType": { @@ -3807,9 +2645,140 @@ } } } - ] + ] + }, + "abi_align": 8, + "fields": { + "Arbitrary": { + "offsets": [ + { + "num_bits": 0 + } + ] + } + }, + "size": { + "num_bits": 128 + }, + "variants": { + "Single": { + "index": 1 + } + } + } + ] + } + } + }, + "name": "std::option::Option<&[core::fmt::rt::Placeholder]>" + } + } + ], + [ + { + "EnumType": { + "discriminants": [ + 0, + 1 + ], + "fields": "elided", + "layout": { + "abi": { + "Scalar": { + "Initialized": { + "valid_range": { + "end": 3, + "start": 0 + }, + "value": { + "Int": { + "length": "I8", + "signed": false + } + } + } + } + }, + "abi_align": 1, + "fields": { + "Arbitrary": { + "offsets": [ + { + "num_bits": 0 + } + ] + } + }, + "size": { + "num_bits": 8 + }, + "variants": { + "Multiple": { + "tag": { + "Initialized": { + "valid_range": { + "end": 3, + "start": 0 + }, + "value": { + "Int": { + "length": "I8", + "signed": false + } + } + } + }, + "tag_encoding": { + "Niche": { + "niche_start": 3, + "niche_variants": { + "end": 0, + "start": 0 + }, + "untagged_variant": 1 + } + }, + "tag_field": 0, + "variants": [ + { + "abi": { + "Aggregate": { + "sized": true + } + }, + "abi_align": 1, + "fields": { + "Arbitrary": { + "offsets": [] + } + }, + "size": { + "num_bits": 0 + }, + "variants": { + "Single": { + "index": 0 + } + } + }, + { + "abi": { + "Scalar": { + "Initialized": { + "valid_range": { + "end": 2, + "start": 0 + }, + "value": { + "Int": { + "length": "I8", + "signed": false + } + } + } + } }, - "abi_align": 8, + "abi_align": 1, "fields": { "Arbitrary": { "offsets": [ @@ -3820,7 +2789,7 @@ } }, "size": { - "num_bits": 128 + "num_bits": 8 }, "variants": { "Single": { @@ -3832,7 +2801,7 @@ } } }, - "name": "std::option::Option<&[core::fmt::rt::Placeholder]>" + "name": "std::option::Option" } } ], @@ -4225,54 +3194,6 @@ } } ], - [ - { - "EnumType": { - "discriminants": [ - 0, - 1 - ], - "fields": "elided", - "layout": { - "abi": { - "Scalar": { - "Initialized": { - "valid_range": { - "end": 18446744073709551615, - "start": 0 - }, - "value": { - "Int": { - "length": "I64", - "signed": true - } - } - } - } - }, - "abi_align": 8, - "fields": { - "Arbitrary": { - "offsets": [ - { - "num_bits": 0 - } - ] - } - }, - "size": { - "num_bits": 64 - }, - "variants": { - "Single": { - "index": 0 - } - } - }, - "name": "std::result::Result" - } - } - ], [ { "StructType": { @@ -4437,28 +3358,61 @@ "Arbitrary": { "offsets": [ { - "num_bits": 416 + "num_bits": 0 }, { "num_bits": 384 + } + ] + } + }, + "size": { + "num_bits": 512 + }, + "variants": { + "Single": { + "index": 0 + } + } + }, + "name": "std::fmt::Formatter<'_>" + } + } + ], + [ + { + "StructType": { + "fields": "elided", + "layout": { + "abi": { + "Aggregate": { + "sized": true + } + }, + "abi_align": 8, + "fields": { + "Arbitrary": { + "offsets": [ + { + "num_bits": 288 }, { - "num_bits": 448 + "num_bits": 256 }, { - "num_bits": 0 + "num_bits": 320 }, { - "num_bits": 128 + "num_bits": 0 }, { - "num_bits": 256 + "num_bits": 128 } ] } }, "size": { - "num_bits": 512 + "num_bits": 384 }, "variants": { "Single": { @@ -4466,7 +3420,7 @@ } } }, - "name": "std::fmt::Formatter<'_>" + "name": "std::fmt::FormattingOptions" } } ], @@ -4939,39 +3893,6 @@ } } ], - [ - { - "PtrType": { - "layout": { - "abi": { - "Scalar": { - "Initialized": { - "valid_range": { - "end": 18446744073709551615, - "start": 0 - }, - "value": { - "Pointer": 0 - } - } - } - }, - "abi_align": 8, - "fields": "Primitive", - "size": { - "num_bits": 64 - }, - "variants": { - "Single": { - "index": 0 - } - } - }, - "mutability": "Mut", - "pointee_type": "elided" - } - } - ], [ { "PtrType": { @@ -5269,72 +4190,6 @@ } } ], - [ - { - "RefType": { - "layout": { - "abi": { - "Scalar": { - "Initialized": { - "valid_range": { - "end": 18446744073709551615, - "start": 1 - }, - "value": { - "Pointer": 0 - } - } - } - }, - "abi_align": 8, - "fields": "Primitive", - "size": { - "num_bits": 64 - }, - "variants": { - "Single": { - "index": 0 - } - } - }, - "mutability": "Not", - "pointee_type": "elided" - } - } - ], - [ - { - "RefType": { - "layout": { - "abi": { - "Scalar": { - "Initialized": { - "valid_range": { - "end": 18446744073709551615, - "start": 1 - }, - "value": { - "Pointer": 0 - } - } - } - }, - "abi_align": 8, - "fields": "Primitive", - "size": { - "num_bits": 64 - }, - "variants": { - "Single": { - "index": 0 - } - } - }, - "mutability": "Not", - "pointee_type": "elided" - } - } - ], [ { "RefType": { @@ -5689,63 +4544,6 @@ } } ], - [ - { - "RefType": { - "layout": { - "abi": { - "ScalarPair": [ - { - "Initialized": { - "valid_range": { - "end": 18446744073709551615, - "start": 1 - }, - "value": { - "Pointer": 0 - } - } - }, - { - "Initialized": { - "valid_range": { - "end": 18446744073709551615, - "start": 1 - }, - "value": { - "Pointer": 0 - } - } - } - ] - }, - "abi_align": 8, - "fields": { - "Arbitrary": { - "offsets": [ - { - "num_bits": 0 - }, - { - "num_bits": 64 - } - ] - } - }, - "size": { - "num_bits": 128 - }, - "variants": { - "Single": { - "index": 0 - } - } - }, - "mutability": "Not", - "pointee_type": "elided" - } - } - ], [ { "FunType": "{closure@std::rt::lang_start<()>::{closure#0}}" diff --git a/tests/integration/programs/binop.smir.json.expected b/tests/integration/expected/nightly-2025-03-01/binop.smir.json.expected similarity index 87% rename from tests/integration/programs/binop.smir.json.expected rename to tests/integration/expected/nightly-2025-03-01/binop.smir.json.expected index 0c56360d..28862d3f 100644 --- a/tests/integration/programs/binop.smir.json.expected +++ b/tests/integration/expected/nightly-2025-03-01/binop.smir.json.expected @@ -1162,89 +1162,118 @@ "mono_item_kind": { "MonoItemFn": { "body": { - "arg_count": 0, + "arg_count": 4, "blocks": [ { "statements": [ + { + "kind": { + "StorageLive": 5 + } + }, + { + "kind": { + "StorageLive": 7 + } + }, { "kind": { "Assign": [ { - "local": 2, + "local": 7, "projection": [] }, { - "Use": { - "Constant": { - "const_": { - "id": 42, - "kind": { - "Allocated": { - "align": 4, - "bytes": [ - 42, - 0, - 0, - 0 - ], - "mutability": "Mut", - "provenance": { - "ptrs": [] - } + "Aggregate": [ + { + "Closure": [ + 0, + [ + { + "Type": 0 + }, + { + "Type": 0 + }, + { + "Type": 0 + }, + { + "Type": 0 } + ] + ] + }, + [ + { + "Copy": { + "local": 1, + "projection": [] } - }, - "span": 163, - "user_ty": null - } - } + } + ] + ] } ] - }, - "span": 164 + } }, { "kind": { "Assign": [ { - "local": 3, + "local": 6, "projection": [] }, { - "Use": { - "Constant": { - "const_": { - "id": 43, - "kind": { - "Allocated": { - "align": 4, - "bytes": [ - 10, - 0, - 0, - 0 - ], - "mutability": "Mut", - "provenance": { - "ptrs": [] - } - } - } - }, - "span": 165, - "user_ty": null + "Ref": [ + { + "kind": "ReErased" + }, + "Shared", + { + "local": 7, + "projection": [] } - } + ] } ] - }, - "span": 166 + } + }, + { + "kind": { + "Assign": [ + { + "local": 5, + "projection": [] + }, + { + "Cast": [ + { + "PointerCoercion": "Unsize" + }, + { + "Copy": { + "local": 6, + "projection": [] + } + }, + 0 + ] + } + ] + } } ], "terminator": { "kind": { "Call": { "args": [ + { + "Move": { + "local": 5, + "projection": [] + } + }, { "Move": { "local": 2, @@ -1256,288 +1285,84 @@ "local": 3, "projection": [] } + }, + { + "Move": { + "local": 4, + "projection": [] + } } ], "destination": { - "local": 1, + "local": 0, "projection": [] }, "func": { "Constant": { "const_": { - "id": 41, "kind": "ZeroSized" }, - "span": 161, "user_ty": null } }, "target": 1, "unwind": "Continue" } - }, - "span": 162 - } - }, - { - "statements": [], - "terminator": { - "kind": "Return", - "span": 167 - } - } - ], - "locals": [ - { - "mutability": "Mut", - "span": 168 - }, - { - "mutability": "Not", - "span": 162 - }, - { - "mutability": "Mut", - "span": 164 - }, - { - "mutability": "Mut", - "span": 166 - } - ], - "span": 171, - "spread_arg": null, - "var_debug_info": [ - { - "argument_index": null, - "composite": null, - "name": "x", - "source_info": { - "scope": 1, - "span": 169 - }, - "value": { - "Const": { - "const_": { - "id": 42, - "kind": { - "Allocated": { - "align": 4, - "bytes": [ - 42, - 0, - 0, - 0 - ], - "mutability": "Mut", - "provenance": { - "ptrs": [] - } - } - } - }, - "span": 163, - "user_ty": null } } }, { - "argument_index": null, - "composite": null, - "name": "y", - "source_info": { - "scope": 2, - "span": 170 - }, - "value": { - "Const": { - "const_": { - "id": 43, - "kind": { - "Allocated": { - "align": 4, - "bytes": [ - 10, - 0, - 0, - 0 - ], - "mutability": "Mut", - "provenance": { - "ptrs": [] - } - } - } - }, - "span": 165, - "user_ty": null + "statements": [ + { + "kind": { + "StorageDead": 5 + } + }, + { + "kind": { + "StorageDead": 7 + } } - } - } - ] - }, - "id": 7, - "name": "main" - } - }, - "symbol_name": "_ZN5binop4main17h" - }, - { - "details": null, - "mono_item_kind": { - "MonoItemFn": { - "body": { - "arg_count": 1, - "blocks": [ - { - "statements": [], + ], "terminator": { - "kind": "Return", - "span": 44 + "kind": "Return" } } ], "locals": [ { - "mutability": "Mut", - "span": 44 + "mutability": "Mut" }, { - "mutability": "Not", - "span": 44 - } - ], - "span": 44, - "spread_arg": null, - "var_debug_info": [] - }, - "id": 4, - "name": "std::ptr::drop_in_place::<{closure@std::rt::lang_start<()>::{closure#0}}>" - } - }, - "symbol_name": "_ZN4core3ptr85drop_in_place$LT$std..rt..lang_start$LT$$LP$$RP$$GT$..$u7b$$u7b$closure$u7d$$u7d$$GT$17h" - }, - { - "details": null, - "mono_item_kind": { - "MonoItemFn": { - "body": { - "arg_count": 1, - "blocks": [ + "mutability": "Not" + }, { - "statements": [], - "terminator": { - "kind": { - "Call": { - "args": [ - { - "Move": { - "local": 1, - "projection": [] - } - }, - { - "Constant": { - "const_": { - "id": 4, - "kind": "ZeroSized" - }, - "span": 32, - "user_ty": null - } - } - ], - "destination": { - "local": 0, - "projection": [] - }, - "func": { - "Constant": { - "const_": { - "id": 3, - "kind": "ZeroSized" - }, - "span": 31, - "user_ty": null - } - }, - "target": 1, - "unwind": "Continue" - } - }, - "span": 33 - } + "mutability": "Not" }, { - "statements": [], - "terminator": { - "kind": { - "Call": { - "args": [ - { - "Constant": { - "const_": { - "id": 4, - "kind": "ZeroSized" - }, - "span": 32, - "user_ty": null - } - } - ], - "destination": { - "local": 2, - "projection": [] - }, - "func": { - "Constant": { - "const_": { - "id": 5, - "kind": "ZeroSized" - }, - "span": 34, - "user_ty": null - } - }, - "target": 2, - "unwind": "Unreachable" - } - }, - "span": 35 - } + "mutability": "Not" }, { - "statements": [], - "terminator": { - "kind": "Return", - "span": 36 - } - } - ], - "locals": [ + "mutability": "Not" + }, { - "mutability": "Mut", - "span": 37 + "mutability": "Mut" }, { - "mutability": "Not", - "span": 38 + "mutability": "Not" }, { - "mutability": "Not", - "span": 39 + "mutability": "Not" } ], - "span": 42, "spread_arg": null, "var_debug_info": [ { "argument_index": 1, "composite": null, - "name": "f", + "name": "main", "source_info": { - "scope": 0, - "span": 38 + "scope": 0 }, "value": { "Place": { @@ -1547,136 +1372,53 @@ } }, { - "argument_index": null, + "argument_index": 2, "composite": null, - "name": "result", + "name": "argc", "source_info": { - "scope": 1, - "span": 40 + "scope": 0 }, "value": { "Place": { - "local": 0, + "local": 2, "projection": [] } } }, { - "argument_index": 1, + "argument_index": 3, "composite": null, - "name": "dummy", + "name": "argv", "source_info": { - "scope": 2, - "span": 41 + "scope": 0 }, "value": { - "Const": { - "const_": { - "id": 4, - "kind": "ZeroSized" - }, - "span": 32, - "user_ty": null - } - } - } - ] - }, - "id": 2, - "name": "std::sys::backtrace::__rust_begin_short_backtrace::" - } - }, - "symbol_name": "_ZN3std3sys9backtrace28__rust_begin_short_backtrace17h" - }, - { - "details": null, - "mono_item_kind": { - "MonoItemFn": { - "body": { - "arg_count": 1, - "blocks": [ - { - "statements": [ - { - "kind": { - "Assign": [ - { - "local": 0, - "projection": [] - }, - { - "Use": { - "Constant": { - "const_": { - "id": 8, - "kind": { - "Allocated": { - "align": 1, - "bytes": [ - 0 - ], - "mutability": "Mut", - "provenance": { - "ptrs": [] - } - } - } - }, - "span": 46, - "user_ty": null - } - } - } - ] - }, - "span": 46 + "Place": { + "local": 3, + "projection": [] } - ], - "terminator": { - "kind": "Return", - "span": 45 } - } - ], - "locals": [ - { - "mutability": "Mut", - "span": 47 }, { - "mutability": "Not", - "span": 48 - } - ], - "span": 49, - "spread_arg": null, - "var_debug_info": [ - { - "argument_index": 1, + "argument_index": 4, "composite": null, - "name": "self", + "name": "sigpipe", "source_info": { - "scope": 0, - "span": 48 + "scope": 0 }, "value": { - "Const": { - "const_": { - "id": 4, - "kind": "ZeroSized" - }, - "span": 32, - "user_ty": null + "Place": { + "local": 4, + "projection": [] } } } ] }, - "id": 5, - "name": "<() as std::process::Termination>::report" + "name": "std::rt::lang_start::<()>" } }, - "symbol_name": "_ZN54_$LT$$LP$$RP$$u20$as$u20$std..process..Termination$GT$6report17h" + "symbol_name": "_ZN3std2rt10lang_start17h" }, { "details": null, @@ -1690,20 +1432,17 @@ { "kind": { "StorageLive": 2 - }, - "span": 16 + } }, { "kind": { "StorageLive": 3 - }, - "span": 15 + } }, { "kind": { "StorageLive": 4 - }, - "span": 17 + } }, { "kind": { @@ -1721,7 +1460,7 @@ { "Field": [ 0, - 7 + 0 ] } ] @@ -1729,8 +1468,7 @@ } } ] - }, - "span": 17 + } } ], "terminator": { @@ -1751,18 +1489,15 @@ "func": { "Constant": { "const_": { - "id": 1, "kind": "ZeroSized" }, - "span": 14, "user_ty": null } }, "target": 1, "unwind": "Continue" } - }, - "span": 15 + } } }, { @@ -1770,8 +1505,7 @@ { "kind": { "StorageDead": 4 - }, - "span": 19 + } } ], "terminator": { @@ -1792,18 +1526,15 @@ "func": { "Constant": { "const_": { - "id": 2, "kind": "ZeroSized" }, - "span": 18, "user_ty": null } }, "target": 2, "unwind": "Continue" } - }, - "span": 16 + } } }, { @@ -1811,14 +1542,12 @@ { "kind": { "StorageDead": 3 - }, - "span": 21 + } }, { "kind": { "StorageLive": 5 - }, - "span": 22 + } }, { "kind": { @@ -1827,42 +1556,6 @@ "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": { @@ -1871,13 +1564,13 @@ { "Field": [ 0, - 15 + 0 ] }, { "Field": [ 0, - 9 + 0 ] } ] @@ -1885,8 +1578,7 @@ } } ] - }, - "span": 23 + } }, { "kind": { @@ -1900,73 +1592,52 @@ "IntToInt", { "Move": { - "local": 6, + "local": 5, "projection": [] } }, - 16 + 0 ] } ] - }, - "span": 24 - }, - { - "kind": { - "StorageDead": 6 - }, - "span": 25 + } }, { "kind": { "StorageDead": 5 - }, - "span": 26 + } }, { "kind": { "StorageDead": 2 - }, - "span": 27 + } } ], "terminator": { - "kind": "Return", - "span": 20 + "kind": "Return" } } ], "locals": [ { - "mutability": "Mut", - "span": 28 - }, - { - "mutability": "Mut", - "span": 3 + "mutability": "Mut" }, { - "mutability": "Mut", - "span": 16 + "mutability": "Mut" }, { - "mutability": "Mut", - "span": 15 + "mutability": "Mut" }, { - "mutability": "Mut", - "span": 17 + "mutability": "Mut" }, { - "mutability": "Mut", - "span": 22 + "mutability": "Mut" }, { - "mutability": "Mut", - "span": 23 + "mutability": "Mut" } ], - "span": 3, "spread_arg": null, "var_debug_info": [ { @@ -1974,8 +1645,7 @@ "composite": null, "name": "main", "source_info": { - "scope": 0, - "span": 9 + "scope": 0 }, "value": { "Place": { @@ -1985,7 +1655,7 @@ { "Field": [ 0, - 7 + 0 ] } ] @@ -1997,8 +1667,7 @@ "composite": null, "name": "self", "source_info": { - "scope": 1, - "span": 29 + "scope": 1 }, "value": { "Place": { @@ -2006,25 +1675,9 @@ "projection": [] } } - }, - { - "argument_index": 1, - "composite": null, - "name": "self", - "source_info": { - "scope": 2, - "span": 30 - }, - "value": { - "Place": { - "local": 5, - "projection": [] - } - } } ] }, - "id": 1, "name": "std::rt::lang_start::<()>::{closure#0}" } }, @@ -2035,62 +1688,150 @@ "mono_item_kind": { "MonoItemFn": { "body": { - "arg_count": 2, + "arg_count": 1, "blocks": [ { "statements": [], "terminator": { "kind": { "Call": { - "args": [], + "args": [ + { + "Move": { + "local": 1, + "projection": [] + } + }, + { + "Constant": { + "const_": { + "kind": "ZeroSized" + }, + "user_ty": null + } + } + ], "destination": { "local": 0, "projection": [] }, "func": { - "Move": { - "local": 1, - "projection": [] + "Constant": { + "const_": { + "kind": "ZeroSized" + }, + "user_ty": null } }, "target": 1, "unwind": "Continue" } - }, - "span": 43 + } + } + }, + { + "statements": [], + "terminator": { + "kind": { + "Call": { + "args": [ + { + "Constant": { + "const_": { + "kind": "ZeroSized" + }, + "user_ty": null + } + } + ], + "destination": { + "local": 2, + "projection": [] + }, + "func": { + "Constant": { + "const_": { + "kind": "ZeroSized" + }, + "user_ty": null + } + }, + "target": 2, + "unwind": "Unreachable" + } + } } }, { "statements": [], "terminator": { - "kind": "Return", - "span": 43 + "kind": "Return" } } ], "locals": [ { - "mutability": "Mut", - "span": 43 + "mutability": "Mut" }, { - "mutability": "Not", - "span": 43 + "mutability": "Not" }, { - "mutability": "Not", - "span": 43 + "mutability": "Not" } ], - "span": 43, - "spread_arg": 2, - "var_debug_info": [] + "spread_arg": null, + "var_debug_info": [ + { + "argument_index": 1, + "composite": null, + "name": "f", + "source_info": { + "scope": 0 + }, + "value": { + "Place": { + "local": 1, + "projection": [] + } + } + }, + { + "argument_index": null, + "composite": null, + "name": "result", + "source_info": { + "scope": 1 + }, + "value": { + "Place": { + "local": 0, + "projection": [] + } + } + }, + { + "argument_index": 1, + "composite": null, + "name": "dummy", + "source_info": { + "scope": 2 + }, + "value": { + "Const": { + "const_": { + "kind": "ZeroSized" + }, + "user_ty": null + } + } + } + ] }, - "id": 3, - "name": ">::call_once" + "name": "std::sys::backtrace::__rust_begin_short_backtrace::" } }, - "symbol_name": "_ZN4core3ops8function6FnOnce9call_once17h" + "symbol_name": "_ZN3std3sys9backtrace28__rust_begin_short_backtrace17h" }, { "details": null, @@ -2127,52 +1868,98 @@ "func": { "Constant": { "const_": { - "id": 6, "kind": "ZeroSized" }, - "span": 43, "user_ty": null } }, "target": 1, "unwind": "Continue" } - }, - "span": 43 + } } }, { "statements": [], "terminator": { - "kind": "Return", - "span": 43 + "kind": "Return" } } ], "locals": [ { - "mutability": "Mut", - "span": 43 + "mutability": "Mut" }, { - "mutability": "Not", - "span": 43 + "mutability": "Not" }, { - "mutability": "Not", - "span": 43 + "mutability": "Not" } ], - "span": 43, "spread_arg": 2, "var_debug_info": [] }, - "id": 3, "name": "<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once" } }, "symbol_name": "_ZN4core3ops8function6FnOnce40call_once$u7b$$u7b$vtable.shim$u7d$$u7d$17h" }, + { + "details": null, + "mono_item_kind": { + "MonoItemFn": { + "body": { + "arg_count": 2, + "blocks": [ + { + "statements": [], + "terminator": { + "kind": { + "Call": { + "args": [], + "destination": { + "local": 0, + "projection": [] + }, + "func": { + "Move": { + "local": 1, + "projection": [] + } + }, + "target": 1, + "unwind": "Continue" + } + } + } + }, + { + "statements": [], + "terminator": { + "kind": "Return" + } + } + ], + "locals": [ + { + "mutability": "Mut" + }, + { + "mutability": "Not" + }, + { + "mutability": "Not" + } + ], + "spread_arg": 2, + "var_debug_info": [] + }, + "name": ">::call_once" + } + }, + "symbol_name": "_ZN4core3ops8function6FnOnce9call_once17h" + }, { "details": null, "mono_item_kind": { @@ -2206,8 +1993,7 @@ ] } ] - }, - "span": 43 + } } ], "terminator": { @@ -2234,10 +2020,8 @@ "func": { "Constant": { "const_": { - "id": 7, "kind": "ZeroSized" }, - "span": 43, "user_ty": null } }, @@ -2246,8 +2030,7 @@ "Cleanup": 3 } } - }, - "span": 43 + } } }, { @@ -2262,15 +2045,13 @@ "target": 2, "unwind": "Continue" } - }, - "span": 43 + } } }, { "statements": [], "terminator": { - "kind": "Return", - "span": 43 + "kind": "Return" } }, { @@ -2285,46 +2066,130 @@ "target": 4, "unwind": "Terminate" } - }, - "span": 43 + } } }, { "statements": [], "terminator": { - "kind": "Resume", - "span": 43 + "kind": "Resume" } } ], "locals": [ { - "mutability": "Mut", - "span": 43 + "mutability": "Mut" }, { - "mutability": "Not", - "span": 43 + "mutability": "Not" }, { - "mutability": "Not", - "span": 43 + "mutability": "Not" }, { - "mutability": "Not", - "span": 43 + "mutability": "Not" } ], - "span": 43, "spread_arg": 2, "var_debug_info": [] }, - "id": 3, "name": "<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once" } }, "symbol_name": "_ZN4core3ops8function6FnOnce9call_once17h" }, + { + "details": null, + "mono_item_kind": { + "MonoItemFn": { + "body": { + "arg_count": 1, + "blocks": [ + { + "statements": [], + "terminator": { + "kind": "Return" + } + } + ], + "locals": [ + { + "mutability": "Mut" + }, + { + "mutability": "Not" + } + ], + "spread_arg": null, + "var_debug_info": [] + }, + "name": "std::ptr::drop_in_place::<{closure@std::rt::lang_start<()>::{closure#0}}>" + } + }, + "symbol_name": "_ZN4core3ptr85drop_in_place$LT$std..rt..lang_start$LT$$LP$$RP$$GT$..$u7b$$u7b$closure$u7d$$u7d$$GT$17h" + }, + { + "details": null, + "mono_item_kind": { + "MonoItemFn": { + "body": { + "arg_count": 1, + "blocks": [ + { + "statements": [ + { + "kind": { + "Assign": [ + { + "local": 0, + "projection": [] + }, + { + "Use": { + "Constant": { + "const_": { + "kind": { + "Allocated": { + "align": 1, + "bytes": [ + 0 + ], + "mutability": "Mut", + "provenance": { + "ptrs": [] + } + } + } + }, + "user_ty": null + } + } + } + ] + } + } + ], + "terminator": { + "kind": "Return" + } + } + ], + "locals": [ + { + "mutability": "Mut" + }, + { + "mutability": "Not" + } + ], + "spread_arg": null, + "var_debug_info": [] + }, + "name": "<() as std::process::Termination>::report" + } + }, + "symbol_name": "_ZN54_$LT$$LP$$RP$$u20$as$u20$std..process..Termination$GT$6report17h" + }, { "details": null, "mono_item_kind": { @@ -2359,8 +2224,7 @@ ] } ] - }, - "span": 50 + } } ], "terminator": { @@ -2373,7 +2237,7 @@ { "Field": [ 1, - 25 + 0 ] } ] @@ -2400,8 +2264,7 @@ "target": 1, "unwind": "Continue" } - }, - "span": 50 + } } }, { @@ -2421,7 +2284,7 @@ { "Field": [ 0, - 16 + 0 ] } ] @@ -2429,8 +2292,7 @@ } } ] - }, - "span": 50 + } } ], "terminator": { @@ -2452,8 +2314,7 @@ "otherwise": 3 } } - }, - "span": 51 + } } }, { @@ -2483,8 +2344,7 @@ ] } ] - }, - "span": 52 + } } ], "terminator": { @@ -2497,7 +2357,7 @@ { "Field": [ 1, - 25 + 0 ] } ] @@ -2524,8 +2384,7 @@ "target": 4, "unwind": "Continue" } - }, - "span": 52 + } } }, { @@ -2537,7 +2396,6 @@ { "Constant": { "const_": { - "id": 10, "kind": { "Allocated": { "align": 8, @@ -2571,7 +2429,6 @@ } } }, - "span": 32, "user_ty": null } } @@ -2583,18 +2440,15 @@ "func": { "Constant": { "const_": { - "id": 9, "kind": "ZeroSized" }, - "span": 53, "user_ty": null } }, "target": null, "unwind": "Continue" } - }, - "span": 53 + } } }, { @@ -2614,7 +2468,7 @@ { "Field": [ 0, - 16 + 0 ] } ] @@ -2622,8 +2476,7 @@ } } ] - }, - "span": 52 + } } ], "terminator": { @@ -2645,8 +2498,7 @@ "otherwise": 6 } } - }, - "span": 54 + } } }, { @@ -2676,8 +2528,7 @@ ] } ] - }, - "span": 55 + } } ], "terminator": { @@ -2690,7 +2541,7 @@ { "Field": [ 1, - 25 + 0 ] } ] @@ -2717,8 +2568,7 @@ "target": 7, "unwind": "Continue" } - }, - "span": 55 + } } }, { @@ -2730,7 +2580,6 @@ { "Constant": { "const_": { - "id": 11, "kind": { "Allocated": { "align": 8, @@ -2764,7 +2613,6 @@ } } }, - "span": 32, "user_ty": null } } @@ -2776,18 +2624,15 @@ "func": { "Constant": { "const_": { - "id": 9, "kind": "ZeroSized" }, - "span": 56, "user_ty": null } }, "target": null, "unwind": "Continue" } - }, - "span": 56 + } } }, { @@ -2807,7 +2652,7 @@ { "Field": [ 0, - 16 + 0 ] } ] @@ -2815,8 +2660,7 @@ } } ] - }, - "span": 55 + } }, { "kind": { @@ -2843,8 +2687,7 @@ ] } ] - }, - "span": 57 + } } ], "terminator": { @@ -2857,7 +2700,7 @@ { "Field": [ 1, - 25 + 0 ] } ] @@ -2884,8 +2727,7 @@ "target": 8, "unwind": "Continue" } - }, - "span": 57 + } } }, { @@ -2905,7 +2747,7 @@ { "Field": [ 0, - 16 + 0 ] } ] @@ -2913,8 +2755,7 @@ } } ] - }, - "span": 57 + } }, { "kind": { @@ -2941,8 +2782,7 @@ ] } ] - }, - "span": 58 + } } ], "terminator": { @@ -2964,8 +2804,7 @@ "otherwise": 9 } } - }, - "span": 58 + } } }, { @@ -2995,8 +2834,7 @@ ] } ] - }, - "span": 59 + } } ], "terminator": { @@ -3009,7 +2847,7 @@ { "Field": [ 1, - 25 + 0 ] } ] @@ -3036,8 +2874,7 @@ "target": 11, "unwind": "Continue" } - }, - "span": 59 + } } }, { @@ -3049,7 +2886,6 @@ { "Constant": { "const_": { - "id": 12, "kind": { "Allocated": { "align": 8, @@ -3083,7 +2919,6 @@ } } }, - "span": 32, "user_ty": null } } @@ -3095,18 +2930,15 @@ "func": { "Constant": { "const_": { - "id": 9, "kind": "ZeroSized" }, - "span": 60, "user_ty": null } }, "target": null, "unwind": "Continue" } - }, - "span": 60 + } } }, { @@ -3126,7 +2958,7 @@ { "Field": [ 0, - 16 + 0 ] } ] @@ -3134,8 +2966,7 @@ } } ] - }, - "span": 59 + } } ], "terminator": { @@ -3157,8 +2988,7 @@ "otherwise": 13 } } - }, - "span": 61 + } } }, { @@ -3188,8 +3018,7 @@ ] } ] - }, - "span": 62 + } } ], "terminator": { @@ -3202,7 +3031,7 @@ { "Field": [ 1, - 25 + 0 ] } ] @@ -3229,8 +3058,7 @@ "target": 14, "unwind": "Continue" } - }, - "span": 62 + } } }, { @@ -3242,7 +3070,6 @@ { "Constant": { "const_": { - "id": 13, "kind": { "Allocated": { "align": 8, @@ -3276,7 +3103,6 @@ } } }, - "span": 32, "user_ty": null } } @@ -3288,18 +3114,15 @@ "func": { "Constant": { "const_": { - "id": 9, "kind": "ZeroSized" }, - "span": 63, "user_ty": null } }, "target": null, "unwind": "Continue" } - }, - "span": 63 + } } }, { @@ -3319,7 +3142,7 @@ { "Field": [ 0, - 16 + 0 ] } ] @@ -3327,8 +3150,7 @@ } } ] - }, - "span": 62 + } } ], "terminator": { @@ -3350,8 +3172,7 @@ "otherwise": 16 } } - }, - "span": 64 + } } }, { @@ -3381,8 +3202,7 @@ ] } ] - }, - "span": 65 + } } ], "terminator": { @@ -3395,7 +3215,7 @@ { "Field": [ 1, - 25 + 0 ] } ] @@ -3422,8 +3242,7 @@ "target": 17, "unwind": "Continue" } - }, - "span": 65 + } } }, { @@ -3435,7 +3254,6 @@ { "Constant": { "const_": { - "id": 14, "kind": { "Allocated": { "align": 8, @@ -3469,7 +3287,6 @@ } } }, - "span": 32, "user_ty": null } } @@ -3481,18 +3298,15 @@ "func": { "Constant": { "const_": { - "id": 9, "kind": "ZeroSized" }, - "span": 66, "user_ty": null } }, "target": null, "unwind": "Continue" } - }, - "span": 66 + } } }, { @@ -3512,7 +3326,7 @@ { "Field": [ 0, - 16 + 0 ] } ] @@ -3520,8 +3334,7 @@ } } ] - }, - "span": 65 + } }, { "kind": { @@ -3548,8 +3361,7 @@ ] } ] - }, - "span": 67 + } } ], "terminator": { @@ -3562,7 +3374,7 @@ { "Field": [ 1, - 25 + 0 ] } ] @@ -3589,8 +3401,7 @@ "target": 18, "unwind": "Continue" } - }, - "span": 67 + } } }, { @@ -3610,7 +3421,7 @@ { "Field": [ 0, - 16 + 0 ] } ] @@ -3618,8 +3429,7 @@ } } ] - }, - "span": 67 + } }, { "kind": { @@ -3646,8 +3456,7 @@ ] } ] - }, - "span": 68 + } } ], "terminator": { @@ -3669,8 +3478,7 @@ "otherwise": 19 } } - }, - "span": 68 + } } }, { @@ -3700,8 +3508,7 @@ ] } ] - }, - "span": 69 + } } ], "terminator": { @@ -3714,7 +3521,7 @@ { "Field": [ 1, - 25 + 0 ] } ] @@ -3741,8 +3548,7 @@ "target": 21, "unwind": "Continue" } - }, - "span": 69 + } } }, { @@ -3754,7 +3560,6 @@ { "Constant": { "const_": { - "id": 15, "kind": { "Allocated": { "align": 8, @@ -3788,7 +3593,6 @@ } } }, - "span": 32, "user_ty": null } } @@ -3800,18 +3604,15 @@ "func": { "Constant": { "const_": { - "id": 9, "kind": "ZeroSized" }, - "span": 70, "user_ty": null } }, "target": null, "unwind": "Continue" } - }, - "span": 70 + } } }, { @@ -3831,7 +3632,7 @@ { "Field": [ 0, - 16 + 0 ] } ] @@ -3839,8 +3640,7 @@ } } ] - }, - "span": 69 + } } ], "terminator": { @@ -3862,8 +3662,7 @@ "otherwise": 23 } } - }, - "span": 71 + } } }, { @@ -3887,7 +3686,6 @@ { "Constant": { "const_": { - "id": 16, "kind": { "Allocated": { "align": 4, @@ -3904,15 +3702,13 @@ } } }, - "span": 72, "user_ty": null } } ] } ] - }, - "span": 72 + } } ], "terminator": { @@ -3936,8 +3732,7 @@ "target": 24, "unwind": "Continue" } - }, - "span": 72 + } } }, { @@ -3949,7 +3744,6 @@ { "Constant": { "const_": { - "id": 17, "kind": { "Allocated": { "align": 8, @@ -3983,7 +3777,6 @@ } } }, - "span": 32, "user_ty": null } } @@ -3995,18 +3788,15 @@ "func": { "Constant": { "const_": { - "id": 9, "kind": "ZeroSized" }, - "span": 73, "user_ty": null } }, "target": null, "unwind": "Continue" } - }, - "span": 73 + } } }, { @@ -4030,8 +3820,7 @@ ] } ] - }, - "span": 72 + } }, { "kind": { @@ -4058,8 +3847,7 @@ ] } ] - }, - "span": 74 + } } ], "terminator": { @@ -4072,7 +3860,7 @@ { "Field": [ 1, - 25 + 0 ] } ] @@ -4099,8 +3887,7 @@ "target": 25, "unwind": "Continue" } - }, - "span": 74 + } } }, { @@ -4120,7 +3907,7 @@ { "Field": [ 0, - 16 + 0 ] } ] @@ -4128,8 +3915,7 @@ } } ] - }, - "span": 74 + } } ], "terminator": { @@ -4151,8 +3937,7 @@ "otherwise": 27 } } - }, - "span": 75 + } } }, { @@ -4176,7 +3961,6 @@ { "Constant": { "const_": { - "id": 16, "kind": { "Allocated": { "align": 4, @@ -4193,15 +3977,13 @@ } } }, - "span": 76, "user_ty": null } } ] } ] - }, - "span": 76 + } } ], "terminator": { @@ -4225,8 +4007,7 @@ "target": 28, "unwind": "Continue" } - }, - "span": 76 + } } }, { @@ -4238,7 +4019,6 @@ { "Constant": { "const_": { - "id": 18, "kind": { "Allocated": { "align": 8, @@ -4272,7 +4052,6 @@ } } }, - "span": 32, "user_ty": null } } @@ -4284,18 +4063,15 @@ "func": { "Constant": { "const_": { - "id": 9, "kind": "ZeroSized" }, - "span": 77, "user_ty": null } }, "target": null, "unwind": "Continue" } - }, - "span": 77 + } } }, { @@ -4319,8 +4095,7 @@ ] } ] - }, - "span": 76 + } }, { "kind": { @@ -4347,8 +4122,7 @@ ] } ] - }, - "span": 78 + } } ], "terminator": { @@ -4361,7 +4135,7 @@ { "Field": [ 1, - 25 + 0 ] } ] @@ -4388,8 +4162,7 @@ "target": 29, "unwind": "Continue" } - }, - "span": 78 + } } }, { @@ -4409,7 +4182,7 @@ { "Field": [ 0, - 16 + 0 ] } ] @@ -4417,8 +4190,7 @@ } } ] - }, - "span": 78 + } } ], "terminator": { @@ -4440,8 +4212,7 @@ "otherwise": 31 } } - }, - "span": 79 + } } }, { @@ -4465,7 +4236,6 @@ { "Constant": { "const_": { - "id": 16, "kind": { "Allocated": { "align": 4, @@ -4482,15 +4252,13 @@ } } }, - "span": 80, "user_ty": null } } ] } ] - }, - "span": 80 + } } ], "terminator": { @@ -4514,8 +4282,7 @@ "target": 32, "unwind": "Continue" } - }, - "span": 80 + } } }, { @@ -4527,7 +4294,6 @@ { "Constant": { "const_": { - "id": 19, "kind": { "Allocated": { "align": 8, @@ -4561,7 +4327,6 @@ } } }, - "span": 32, "user_ty": null } } @@ -4573,18 +4338,15 @@ "func": { "Constant": { "const_": { - "id": 9, "kind": "ZeroSized" }, - "span": 81, "user_ty": null } }, "target": null, "unwind": "Continue" } - }, - "span": 81 + } } }, { @@ -4608,8 +4370,7 @@ ] } ] - }, - "span": 80 + } }, { "kind": { @@ -4630,7 +4391,6 @@ { "Constant": { "const_": { - "id": 16, "kind": { "Allocated": { "align": 4, @@ -4647,15 +4407,13 @@ } } }, - "span": 82, "user_ty": null } } ] } ] - }, - "span": 82 + } } ], "terminator": { @@ -4679,8 +4437,7 @@ "target": 33, "unwind": "Continue" } - }, - "span": 82 + } } }, { @@ -4704,8 +4461,7 @@ ] } ] - }, - "span": 82 + } }, { "kind": { @@ -4732,8 +4488,7 @@ ] } ] - }, - "span": 83 + } } ], "terminator": { @@ -4746,7 +4501,7 @@ { "Field": [ 1, - 25 + 0 ] } ] @@ -4773,8 +4528,7 @@ "target": 34, "unwind": "Continue" } - }, - "span": 83 + } } }, { @@ -4794,7 +4548,7 @@ { "Field": [ 0, - 16 + 0 ] } ] @@ -4802,8 +4556,7 @@ } } ] - }, - "span": 83 + } } ], "terminator": { @@ -4825,8 +4578,7 @@ "otherwise": 36 } } - }, - "span": 84 + } } }, { @@ -4844,7 +4596,6 @@ { "Constant": { "const_": { - "id": 20, "kind": { "Allocated": { "align": 4, @@ -4861,14 +4612,12 @@ } } }, - "span": 86, "user_ty": null } }, { "Constant": { "const_": { - "id": 21, "kind": { "Allocated": { "align": 4, @@ -4885,15 +4634,13 @@ } } }, - "span": 87, "user_ty": null } } ] } ] - }, - "span": 88 + } } ], "terminator": { @@ -4915,8 +4662,7 @@ "otherwise": 38 } } - }, - "span": 85 + } } }, { @@ -4928,7 +4674,6 @@ { "Constant": { "const_": { - "id": 22, "kind": { "Allocated": { "align": 8, @@ -4962,7 +4707,6 @@ } } }, - "span": 32, "user_ty": null } } @@ -4974,18 +4718,15 @@ "func": { "Constant": { "const_": { - "id": 9, "kind": "ZeroSized" }, - "span": 89, "user_ty": null } }, "target": null, "unwind": "Continue" } - }, - "span": 89 + } } }, { @@ -5003,7 +4744,6 @@ { "Constant": { "const_": { - "id": 20, "kind": { "Allocated": { "align": 4, @@ -5020,14 +4760,12 @@ } } }, - "span": 91, "user_ty": null } }, { "Constant": { "const_": { - "id": 23, "kind": { "Allocated": { "align": 4, @@ -5044,15 +4782,13 @@ } } }, - "span": 92, "user_ty": null } } ] } ] - }, - "span": 93 + } } ], "terminator": { @@ -5074,8 +4810,7 @@ "otherwise": 40 } } - }, - "span": 90 + } } }, { @@ -5087,7 +4822,6 @@ { "Constant": { "const_": { - "id": 24, "kind": { "Allocated": { "align": 8, @@ -5121,7 +4855,6 @@ } } }, - "span": 32, "user_ty": null } } @@ -5133,18 +4866,15 @@ "func": { "Constant": { "const_": { - "id": 9, "kind": "ZeroSized" }, - "span": 94, "user_ty": null } }, "target": null, "unwind": "Continue" } - }, - "span": 94 + } } }, { @@ -5162,7 +4892,6 @@ { "Constant": { "const_": { - "id": 20, "kind": { "Allocated": { "align": 4, @@ -5179,14 +4908,12 @@ } } }, - "span": 96, "user_ty": null } }, { "Constant": { "const_": { - "id": 21, "kind": { "Allocated": { "align": 4, @@ -5203,15 +4930,13 @@ } } }, - "span": 97, "user_ty": null } } ] } ] - }, - "span": 98 + } } ], "terminator": { @@ -5233,8 +4958,7 @@ "otherwise": 42 } } - }, - "span": 95 + } } }, { @@ -5246,7 +4970,6 @@ { "Constant": { "const_": { - "id": 25, "kind": { "Allocated": { "align": 8, @@ -5280,7 +5003,6 @@ } } }, - "span": 32, "user_ty": null } } @@ -5292,18 +5014,15 @@ "func": { "Constant": { "const_": { - "id": 9, "kind": "ZeroSized" }, - "span": 99, "user_ty": null } }, "target": null, "unwind": "Continue" } - }, - "span": 99 + } } }, { @@ -5321,7 +5040,6 @@ { "Constant": { "const_": { - "id": 20, "kind": { "Allocated": { "align": 4, @@ -5338,14 +5056,12 @@ } } }, - "span": 101, "user_ty": null } }, { "Constant": { "const_": { - "id": 23, "kind": { "Allocated": { "align": 4, @@ -5362,15 +5078,13 @@ } } }, - "span": 102, "user_ty": null } } ] } ] - }, - "span": 103 + } } ], "terminator": { @@ -5392,8 +5106,7 @@ "otherwise": 44 } } - }, - "span": 100 + } } }, { @@ -5405,7 +5118,6 @@ { "Constant": { "const_": { - "id": 26, "kind": { "Allocated": { "align": 8, @@ -5439,7 +5151,6 @@ } } }, - "span": 32, "user_ty": null } } @@ -5451,18 +5162,15 @@ "func": { "Constant": { "const_": { - "id": 9, "kind": "ZeroSized" }, - "span": 104, "user_ty": null } }, "target": null, "unwind": "Continue" } - }, - "span": 104 + } } }, { @@ -5480,7 +5188,6 @@ { "Constant": { "const_": { - "id": 20, "kind": { "Allocated": { "align": 4, @@ -5497,14 +5204,12 @@ } } }, - "span": 106, "user_ty": null } }, { "Constant": { "const_": { - "id": 21, "kind": { "Allocated": { "align": 4, @@ -5521,15 +5226,13 @@ } } }, - "span": 107, "user_ty": null } } ] } ] - }, - "span": 108 + } } ], "terminator": { @@ -5551,8 +5254,7 @@ "otherwise": 46 } } - }, - "span": 105 + } } }, { @@ -5564,7 +5266,6 @@ { "Constant": { "const_": { - "id": 27, "kind": { "Allocated": { "align": 8, @@ -5598,7 +5299,6 @@ } } }, - "span": 32, "user_ty": null } } @@ -5610,18 +5310,15 @@ "func": { "Constant": { "const_": { - "id": 9, "kind": "ZeroSized" }, - "span": 109, "user_ty": null } }, "target": null, "unwind": "Continue" } - }, - "span": 109 + } } }, { @@ -5639,7 +5336,6 @@ { "Constant": { "const_": { - "id": 20, "kind": { "Allocated": { "align": 4, @@ -5656,14 +5352,12 @@ } } }, - "span": 111, "user_ty": null } }, { "Constant": { "const_": { - "id": 23, "kind": { "Allocated": { "align": 4, @@ -5680,15 +5374,13 @@ } } }, - "span": 112, "user_ty": null } } ] } ] - }, - "span": 113 + } } ], "terminator": { @@ -5710,8 +5402,7 @@ "otherwise": 48 } } - }, - "span": 110 + } } }, { @@ -5723,7 +5414,6 @@ { "Constant": { "const_": { - "id": 28, "kind": { "Allocated": { "align": 8, @@ -5757,7 +5447,6 @@ } } }, - "span": 32, "user_ty": null } } @@ -5769,18 +5458,15 @@ "func": { "Constant": { "const_": { - "id": 9, "kind": "ZeroSized" }, - "span": 114, "user_ty": null } }, "target": null, "unwind": "Continue" } - }, - "span": 114 + } } }, { @@ -5798,7 +5484,6 @@ { "Constant": { "const_": { - "id": 20, "kind": { "Allocated": { "align": 4, @@ -5815,16 +5500,14 @@ } } }, - "span": 116, "user_ty": null } }, - 28 + 0 ] } ] - }, - "span": 117 + } }, { "kind": { @@ -5845,7 +5528,6 @@ { "Constant": { "const_": { - "id": 29, "kind": { "Allocated": { "align": 4, @@ -5862,15 +5544,13 @@ } } }, - "span": 117, "user_ty": null } } ] } ] - }, - "span": 117 + } } ], "terminator": { @@ -5889,7 +5569,6 @@ { "Constant": { "const_": { - "id": 21, "kind": { "Allocated": { "align": 4, @@ -5906,14 +5585,12 @@ } } }, - "span": 115, "user_ty": null } }, { "Constant": { "const_": { - "id": 20, "kind": { "Allocated": { "align": 4, @@ -5930,7 +5607,6 @@ } } }, - "span": 116, "user_ty": null } } @@ -5939,8 +5615,7 @@ "target": 49, "unwind": "Continue" } - }, - "span": 117 + } } }, { @@ -5952,7 +5627,6 @@ { "Constant": { "const_": { - "id": 30, "kind": { "Allocated": { "align": 8, @@ -5986,7 +5660,6 @@ } } }, - "span": 32, "user_ty": null } } @@ -5998,18 +5671,15 @@ "func": { "Constant": { "const_": { - "id": 9, "kind": "ZeroSized" }, - "span": 118, "user_ty": null } }, "target": null, "unwind": "Continue" } - }, - "span": 118 + } } }, { @@ -6027,7 +5697,6 @@ { "Constant": { "const_": { - "id": 21, "kind": { "Allocated": { "align": 4, @@ -6044,14 +5713,12 @@ } } }, - "span": 115, "user_ty": null } }, { "Constant": { "const_": { - "id": 20, "kind": { "Allocated": { "align": 4, @@ -6068,15 +5735,13 @@ } } }, - "span": 116, "user_ty": null } } ] } ] - }, - "span": 117 + } } ], "terminator": { @@ -6098,8 +5763,7 @@ "otherwise": 51 } } - }, - "span": 119 + } } }, { @@ -6117,7 +5781,6 @@ { "Constant": { "const_": { - "id": 20, "kind": { "Allocated": { "align": 4, @@ -6134,16 +5797,14 @@ } } }, - "span": 121, "user_ty": null } }, - 28 + 0 ] } ] - }, - "span": 122 + } }, { "kind": { @@ -6164,7 +5825,6 @@ { "Constant": { "const_": { - "id": 29, "kind": { "Allocated": { "align": 4, @@ -6181,15 +5841,13 @@ } } }, - "span": 122, "user_ty": null } } ] } ] - }, - "span": 122 + } } ], "terminator": { @@ -6208,7 +5866,6 @@ { "Constant": { "const_": { - "id": 21, "kind": { "Allocated": { "align": 4, @@ -6225,14 +5882,12 @@ } } }, - "span": 120, "user_ty": null } }, { "Constant": { "const_": { - "id": 20, "kind": { "Allocated": { "align": 4, @@ -6249,7 +5904,6 @@ } } }, - "span": 121, "user_ty": null } } @@ -6258,8 +5912,7 @@ "target": 52, "unwind": "Continue" } - }, - "span": 122 + } } }, { @@ -6271,7 +5924,6 @@ { "Constant": { "const_": { - "id": 31, "kind": { "Allocated": { "align": 8, @@ -6305,7 +5957,6 @@ } } }, - "span": 32, "user_ty": null } } @@ -6317,18 +5968,15 @@ "func": { "Constant": { "const_": { - "id": 9, "kind": "ZeroSized" }, - "span": 123, "user_ty": null } }, "target": null, "unwind": "Continue" } - }, - "span": 123 + } } }, { @@ -6346,7 +5994,6 @@ { "Constant": { "const_": { - "id": 21, "kind": { "Allocated": { "align": 4, @@ -6363,14 +6010,12 @@ } } }, - "span": 120, "user_ty": null } }, { "Constant": { "const_": { - "id": 20, "kind": { "Allocated": { "align": 4, @@ -6387,15 +6032,13 @@ } } }, - "span": 121, "user_ty": null } } ] } ] - }, - "span": 122 + } } ], "terminator": { @@ -6417,8 +6060,7 @@ "otherwise": 54 } } - }, - "span": 124 + } } }, { @@ -6436,7 +6078,6 @@ { "Constant": { "const_": { - "id": 20, "kind": { "Allocated": { "align": 4, @@ -6453,16 +6094,14 @@ } } }, - "span": 126, "user_ty": null } }, - 28 + 0 ] } ] - }, - "span": 127 + } }, { "kind": { @@ -6483,7 +6122,6 @@ { "Constant": { "const_": { - "id": 29, "kind": { "Allocated": { "align": 4, @@ -6500,15 +6138,13 @@ } } }, - "span": 127, "user_ty": null } } ] } ] - }, - "span": 127 + } } ], "terminator": { @@ -6527,7 +6163,6 @@ { "Constant": { "const_": { - "id": 23, "kind": { "Allocated": { "align": 4, @@ -6544,14 +6179,12 @@ } } }, - "span": 125, "user_ty": null } }, { "Constant": { "const_": { - "id": 20, "kind": { "Allocated": { "align": 4, @@ -6568,7 +6201,6 @@ } } }, - "span": 126, "user_ty": null } } @@ -6577,8 +6209,7 @@ "target": 55, "unwind": "Continue" } - }, - "span": 127 + } } }, { @@ -6590,7 +6221,6 @@ { "Constant": { "const_": { - "id": 32, "kind": { "Allocated": { "align": 8, @@ -6624,7 +6254,6 @@ } } }, - "span": 32, "user_ty": null } } @@ -6636,18 +6265,15 @@ "func": { "Constant": { "const_": { - "id": 9, "kind": "ZeroSized" }, - "span": 128, "user_ty": null } }, "target": null, "unwind": "Continue" } - }, - "span": 128 + } } }, { @@ -6665,7 +6291,6 @@ { "Constant": { "const_": { - "id": 23, "kind": { "Allocated": { "align": 4, @@ -6682,14 +6307,12 @@ } } }, - "span": 125, "user_ty": null } }, { "Constant": { "const_": { - "id": 20, "kind": { "Allocated": { "align": 4, @@ -6706,15 +6329,13 @@ } } }, - "span": 126, "user_ty": null } } ] } ] - }, - "span": 127 + } } ], "terminator": { @@ -6736,8 +6357,7 @@ "otherwise": 57 } } - }, - "span": 129 + } } }, { @@ -6755,7 +6375,6 @@ { "Constant": { "const_": { - "id": 20, "kind": { "Allocated": { "align": 4, @@ -6772,16 +6391,14 @@ } } }, - "span": 131, "user_ty": null } }, - 28 + 0 ] } ] - }, - "span": 132 + } }, { "kind": { @@ -6802,7 +6419,6 @@ { "Constant": { "const_": { - "id": 29, "kind": { "Allocated": { "align": 4, @@ -6819,15 +6435,13 @@ } } }, - "span": 132, "user_ty": null } } ] } ] - }, - "span": 132 + } } ], "terminator": { @@ -6846,7 +6460,6 @@ { "Constant": { "const_": { - "id": 20, "kind": { "Allocated": { "align": 4, @@ -6863,14 +6476,12 @@ } } }, - "span": 130, "user_ty": null } }, { "Constant": { "const_": { - "id": 20, "kind": { "Allocated": { "align": 4, @@ -6887,7 +6498,6 @@ } } }, - "span": 131, "user_ty": null } } @@ -6896,8 +6506,7 @@ "target": 58, "unwind": "Continue" } - }, - "span": 132 + } } }, { @@ -6909,7 +6518,6 @@ { "Constant": { "const_": { - "id": 33, "kind": { "Allocated": { "align": 8, @@ -6943,7 +6551,6 @@ } } }, - "span": 32, "user_ty": null } } @@ -6955,18 +6562,15 @@ "func": { "Constant": { "const_": { - "id": 9, "kind": "ZeroSized" }, - "span": 133, "user_ty": null } }, "target": null, "unwind": "Continue" } - }, - "span": 133 + } } }, { @@ -6984,7 +6588,6 @@ { "Constant": { "const_": { - "id": 20, "kind": { "Allocated": { "align": 4, @@ -7001,14 +6604,12 @@ } } }, - "span": 130, "user_ty": null } }, { "Constant": { "const_": { - "id": 20, "kind": { "Allocated": { "align": 4, @@ -7025,15 +6626,13 @@ } } }, - "span": 131, "user_ty": null } } ] } ] - }, - "span": 132 + } } ], "terminator": { @@ -7055,8 +6654,7 @@ "otherwise": 60 } } - }, - "span": 134 + } } }, { @@ -7086,8 +6684,7 @@ ] } ] - }, - "span": 135 + } } ], "terminator": { @@ -7100,7 +6697,7 @@ { "Field": [ 1, - 25 + 0 ] } ] @@ -7127,8 +6724,7 @@ "target": 61, "unwind": "Continue" } - }, - "span": 135 + } } }, { @@ -7140,7 +6736,6 @@ { "Constant": { "const_": { - "id": 34, "kind": { "Allocated": { "align": 8, @@ -7174,7 +6769,6 @@ } } }, - "span": 32, "user_ty": null } } @@ -7186,18 +6780,15 @@ "func": { "Constant": { "const_": { - "id": 9, "kind": "ZeroSized" }, - "span": 136, "user_ty": null } }, "target": null, "unwind": "Continue" } - }, - "span": 136 + } } }, { @@ -7217,7 +6808,7 @@ { "Field": [ 0, - 16 + 0 ] } ] @@ -7225,8 +6816,7 @@ } } ] - }, - "span": 135 + } }, { "kind": { @@ -7253,8 +6843,7 @@ ] } ] - }, - "span": 137 + } } ], "terminator": { @@ -7276,8 +6865,7 @@ "otherwise": 62 } } - }, - "span": 137 + } } }, { @@ -7307,8 +6895,7 @@ ] } ] - }, - "span": 138 + } } ], "terminator": { @@ -7321,7 +6908,7 @@ { "Field": [ 1, - 25 + 0 ] } ] @@ -7348,8 +6935,7 @@ "target": 64, "unwind": "Continue" } - }, - "span": 138 + } } }, { @@ -7361,7 +6947,6 @@ { "Constant": { "const_": { - "id": 35, "kind": { "Allocated": { "align": 8, @@ -7395,7 +6980,6 @@ } } }, - "span": 32, "user_ty": null } } @@ -7407,18 +6991,15 @@ "func": { "Constant": { "const_": { - "id": 9, "kind": "ZeroSized" }, - "span": 139, "user_ty": null } }, "target": null, "unwind": "Continue" } - }, - "span": 139 + } } }, { @@ -7438,7 +7019,7 @@ { "Field": [ 0, - 16 + 0 ] } ] @@ -7446,8 +7027,7 @@ } } ] - }, - "span": 138 + } }, { "kind": { @@ -7474,8 +7054,7 @@ ] } ] - }, - "span": 140 + } } ], "terminator": { @@ -7497,8 +7076,7 @@ "otherwise": 65 } } - }, - "span": 140 + } } }, { @@ -7528,8 +7106,7 @@ ] } ] - }, - "span": 141 + } } ], "terminator": { @@ -7542,7 +7119,7 @@ { "Field": [ 1, - 25 + 0 ] } ] @@ -7569,8 +7146,7 @@ "target": 67, "unwind": "Continue" } - }, - "span": 141 + } } }, { @@ -7582,7 +7158,6 @@ { "Constant": { "const_": { - "id": 36, "kind": { "Allocated": { "align": 8, @@ -7616,7 +7191,6 @@ } } }, - "span": 32, "user_ty": null } } @@ -7628,18 +7202,15 @@ "func": { "Constant": { "const_": { - "id": 9, "kind": "ZeroSized" }, - "span": 142, "user_ty": null } }, "target": null, "unwind": "Continue" } - }, - "span": 142 + } } }, { @@ -7659,7 +7230,7 @@ { "Field": [ 0, - 16 + 0 ] } ] @@ -7667,8 +7238,7 @@ } } ] - }, - "span": 141 + } }, { "kind": { @@ -7695,8 +7265,7 @@ ] } ] - }, - "span": 143 + } } ], "terminator": { @@ -7709,7 +7278,7 @@ { "Field": [ 1, - 25 + 0 ] } ] @@ -7736,8 +7305,7 @@ "target": 68, "unwind": "Continue" } - }, - "span": 143 + } } }, { @@ -7757,7 +7325,7 @@ { "Field": [ 0, - 16 + 0 ] } ] @@ -7765,8 +7333,7 @@ } } ] - }, - "span": 143 + } }, { "kind": { @@ -7793,8 +7360,7 @@ ] } ] - }, - "span": 144 + } } ], "terminator": { @@ -7816,8 +7382,7 @@ "otherwise": 69 } } - }, - "span": 144 + } } }, { @@ -7847,8 +7412,7 @@ ] } ] - }, - "span": 145 + } } ], "terminator": { @@ -7861,7 +7425,7 @@ { "Field": [ 1, - 25 + 0 ] } ] @@ -7888,8 +7452,7 @@ "target": 71, "unwind": "Continue" } - }, - "span": 145 + } } }, { @@ -7901,7 +7464,6 @@ { "Constant": { "const_": { - "id": 37, "kind": { "Allocated": { "align": 8, @@ -7935,7 +7497,6 @@ } } }, - "span": 32, "user_ty": null } } @@ -7947,18 +7508,15 @@ "func": { "Constant": { "const_": { - "id": 9, "kind": "ZeroSized" }, - "span": 146, "user_ty": null } }, "target": null, "unwind": "Continue" } - }, - "span": 146 + } } }, { @@ -7978,7 +7536,7 @@ { "Field": [ 0, - 16 + 0 ] } ] @@ -7986,8 +7544,7 @@ } } ] - }, - "span": 145 + } }, { "kind": { @@ -8014,8 +7571,7 @@ ] } ] - }, - "span": 147 + } } ], "terminator": { @@ -8037,8 +7593,7 @@ "otherwise": 72 } } - }, - "span": 147 + } } }, { @@ -8068,8 +7623,7 @@ ] } ] - }, - "span": 148 + } } ], "terminator": { @@ -8082,7 +7636,7 @@ { "Field": [ 1, - 25 + 0 ] } ] @@ -8109,8 +7663,7 @@ "target": 74, "unwind": "Continue" } - }, - "span": 148 + } } }, { @@ -8122,7 +7675,6 @@ { "Constant": { "const_": { - "id": 38, "kind": { "Allocated": { "align": 8, @@ -8156,7 +7708,6 @@ } } }, - "span": 32, "user_ty": null } } @@ -8168,18 +7719,15 @@ "func": { "Constant": { "const_": { - "id": 9, "kind": "ZeroSized" }, - "span": 149, "user_ty": null } }, "target": null, "unwind": "Continue" } - }, - "span": 149 + } } }, { @@ -8199,7 +7747,7 @@ { "Field": [ 0, - 16 + 0 ] } ] @@ -8207,8 +7755,7 @@ } } ] - }, - "span": 148 + } }, { "kind": { @@ -8235,8 +7782,7 @@ ] } ] - }, - "span": 150 + } } ], "terminator": { @@ -8258,8 +7804,7 @@ "otherwise": 75 } } - }, - "span": 150 + } } }, { @@ -8289,8 +7834,7 @@ ] } ] - }, - "span": 151 + } } ], "terminator": { @@ -8303,7 +7847,7 @@ { "Field": [ 1, - 25 + 0 ] } ] @@ -8330,8 +7874,7 @@ "target": 77, "unwind": "Continue" } - }, - "span": 151 + } } }, { @@ -8343,7 +7886,6 @@ { "Constant": { "const_": { - "id": 39, "kind": { "Allocated": { "align": 8, @@ -8377,7 +7919,6 @@ } } }, - "span": 32, "user_ty": null } } @@ -8389,18 +7930,15 @@ "func": { "Constant": { "const_": { - "id": 9, "kind": "ZeroSized" }, - "span": 152, "user_ty": null } }, "target": null, "unwind": "Continue" } - }, - "span": 152 + } } }, { @@ -8420,7 +7958,7 @@ { "Field": [ 0, - 16 + 0 ] } ] @@ -8428,8 +7966,7 @@ } } ] - }, - "span": 151 + } }, { "kind": { @@ -8456,8 +7993,7 @@ ] } ] - }, - "span": 153 + } } ], "terminator": { @@ -8470,7 +8006,7 @@ { "Field": [ 1, - 25 + 0 ] } ] @@ -8497,8 +8033,7 @@ "target": 78, "unwind": "Continue" } - }, - "span": 153 + } } }, { @@ -8518,7 +8053,7 @@ { "Field": [ 0, - 16 + 0 ] } ] @@ -8526,8 +8061,7 @@ } } ] - }, - "span": 153 + } }, { "kind": { @@ -8554,8 +8088,7 @@ ] } ] - }, - "span": 154 + } } ], "terminator": { @@ -8577,15 +8110,13 @@ "otherwise": 79 } } - }, - "span": 154 + } } }, { "statements": [], "terminator": { - "kind": "Return", - "span": 155 + "kind": "Return" } }, { @@ -8597,7 +8128,6 @@ { "Constant": { "const_": { - "id": 40, "kind": { "Allocated": { "align": 8, @@ -8631,7 +8161,6 @@ } } }, - "span": 32, "user_ty": null } } @@ -8643,436 +8172,329 @@ "func": { "Constant": { "const_": { - "id": 9, "kind": "ZeroSized" }, - "span": 156, "user_ty": null } }, "target": null, "unwind": "Continue" } - }, - "span": 156 + } } } ], "locals": [ { - "mutability": "Mut", - "span": 157 + "mutability": "Mut" }, { - "mutability": "Not", - "span": 158 + "mutability": "Not" }, { - "mutability": "Not", - "span": 159 + "mutability": "Not" }, { - "mutability": "Mut", - "span": 50 + "mutability": "Mut" }, { - "mutability": "Mut", - "span": 50 + "mutability": "Mut" }, { - "mutability": "Mut", - "span": 53 + "mutability": "Mut" }, { - "mutability": "Mut", - "span": 52 + "mutability": "Mut" }, { - "mutability": "Mut", - "span": 52 + "mutability": "Mut" }, { - "mutability": "Mut", - "span": 56 + "mutability": "Mut" }, { - "mutability": "Mut", - "span": 58 + "mutability": "Mut" }, { - "mutability": "Mut", - "span": 55 + "mutability": "Mut" }, { - "mutability": "Mut", - "span": 55 + "mutability": "Mut" }, { - "mutability": "Mut", - "span": 57 + "mutability": "Mut" }, { - "mutability": "Mut", - "span": 57 + "mutability": "Mut" }, { - "mutability": "Mut", - "span": 60 + "mutability": "Mut" }, { - "mutability": "Mut", - "span": 59 + "mutability": "Mut" }, { - "mutability": "Mut", - "span": 59 + "mutability": "Mut" }, { - "mutability": "Mut", - "span": 63 + "mutability": "Mut" }, { - "mutability": "Mut", - "span": 62 + "mutability": "Mut" }, { - "mutability": "Mut", - "span": 62 + "mutability": "Mut" }, { - "mutability": "Mut", - "span": 66 + "mutability": "Mut" }, { - "mutability": "Mut", - "span": 68 + "mutability": "Mut" }, { - "mutability": "Mut", - "span": 65 + "mutability": "Mut" }, { - "mutability": "Mut", - "span": 65 + "mutability": "Mut" }, { - "mutability": "Mut", - "span": 67 + "mutability": "Mut" }, { - "mutability": "Mut", - "span": 67 + "mutability": "Mut" }, { - "mutability": "Mut", - "span": 70 + "mutability": "Mut" }, { - "mutability": "Mut", - "span": 69 + "mutability": "Mut" }, { - "mutability": "Mut", - "span": 69 + "mutability": "Mut" }, { - "mutability": "Mut", - "span": 73 + "mutability": "Mut" }, { - "mutability": "Mut", - "span": 74 + "mutability": "Mut" }, { - "mutability": "Mut", - "span": 72 + "mutability": "Mut" }, { - "mutability": "Mut", - "span": 72 + "mutability": "Mut" }, { - "mutability": "Mut", - "span": 74 + "mutability": "Mut" }, { - "mutability": "Mut", - "span": 77 + "mutability": "Mut" }, { - "mutability": "Mut", - "span": 78 + "mutability": "Mut" }, { - "mutability": "Mut", - "span": 76 + "mutability": "Mut" }, { - "mutability": "Mut", - "span": 76 + "mutability": "Mut" }, { - "mutability": "Mut", - "span": 78 + "mutability": "Mut" }, { - "mutability": "Mut", - "span": 81 + "mutability": "Mut" }, { - "mutability": "Mut", - "span": 83 + "mutability": "Mut" }, { - "mutability": "Mut", - "span": 80 + "mutability": "Mut" }, { - "mutability": "Mut", - "span": 80 + "mutability": "Mut" }, { - "mutability": "Mut", - "span": 82 + "mutability": "Mut" }, { - "mutability": "Mut", - "span": 82 + "mutability": "Mut" }, { - "mutability": "Mut", - "span": 83 + "mutability": "Mut" }, { - "mutability": "Mut", - "span": 89 + "mutability": "Mut" }, { - "mutability": "Mut", - "span": 88 + "mutability": "Mut" }, { - "mutability": "Mut", - "span": 94 + "mutability": "Mut" }, { - "mutability": "Mut", - "span": 93 + "mutability": "Mut" }, { - "mutability": "Mut", - "span": 99 + "mutability": "Mut" }, { - "mutability": "Mut", - "span": 98 + "mutability": "Mut" }, { - "mutability": "Mut", - "span": 104 + "mutability": "Mut" }, { - "mutability": "Mut", - "span": 103 + "mutability": "Mut" }, { - "mutability": "Mut", - "span": 109 + "mutability": "Mut" }, { - "mutability": "Mut", - "span": 108 + "mutability": "Mut" }, { - "mutability": "Mut", - "span": 114 + "mutability": "Mut" }, { - "mutability": "Mut", - "span": 113 + "mutability": "Mut" }, { - "mutability": "Mut", - "span": 118 + "mutability": "Mut" }, { - "mutability": "Mut", - "span": 117 + "mutability": "Mut" }, { - "mutability": "Mut", - "span": 117 + "mutability": "Mut" }, { - "mutability": "Mut", - "span": 117 + "mutability": "Mut" }, { - "mutability": "Mut", - "span": 123 + "mutability": "Mut" }, { - "mutability": "Mut", - "span": 122 + "mutability": "Mut" }, { - "mutability": "Mut", - "span": 122 + "mutability": "Mut" }, { - "mutability": "Mut", - "span": 122 + "mutability": "Mut" }, { - "mutability": "Mut", - "span": 128 + "mutability": "Mut" }, { - "mutability": "Mut", - "span": 127 + "mutability": "Mut" }, { - "mutability": "Mut", - "span": 127 + "mutability": "Mut" }, { - "mutability": "Mut", - "span": 127 + "mutability": "Mut" }, { - "mutability": "Mut", - "span": 133 + "mutability": "Mut" }, { - "mutability": "Mut", - "span": 132 + "mutability": "Mut" }, { - "mutability": "Mut", - "span": 132 + "mutability": "Mut" }, { - "mutability": "Mut", - "span": 132 + "mutability": "Mut" }, { - "mutability": "Mut", - "span": 136 + "mutability": "Mut" }, { - "mutability": "Mut", - "span": 137 + "mutability": "Mut" }, { - "mutability": "Mut", - "span": 135 + "mutability": "Mut" }, { - "mutability": "Mut", - "span": 135 + "mutability": "Mut" }, { - "mutability": "Mut", - "span": 139 + "mutability": "Mut" }, { - "mutability": "Mut", - "span": 140 + "mutability": "Mut" }, { - "mutability": "Mut", - "span": 138 + "mutability": "Mut" }, { - "mutability": "Mut", - "span": 138 + "mutability": "Mut" }, { - "mutability": "Mut", - "span": 142 + "mutability": "Mut" }, { - "mutability": "Mut", - "span": 144 + "mutability": "Mut" }, { - "mutability": "Mut", - "span": 143 + "mutability": "Mut" }, { - "mutability": "Mut", - "span": 141 + "mutability": "Mut" }, { - "mutability": "Mut", - "span": 141 + "mutability": "Mut" }, { - "mutability": "Mut", - "span": 143 + "mutability": "Mut" }, { - "mutability": "Mut", - "span": 146 + "mutability": "Mut" }, { - "mutability": "Mut", - "span": 147 + "mutability": "Mut" }, { - "mutability": "Mut", - "span": 145 + "mutability": "Mut" }, { - "mutability": "Mut", - "span": 145 + "mutability": "Mut" }, { - "mutability": "Mut", - "span": 149 + "mutability": "Mut" }, { - "mutability": "Mut", - "span": 150 + "mutability": "Mut" }, { - "mutability": "Mut", - "span": 148 + "mutability": "Mut" }, { - "mutability": "Mut", - "span": 148 + "mutability": "Mut" }, { - "mutability": "Mut", - "span": 152 + "mutability": "Mut" }, { - "mutability": "Mut", - "span": 154 + "mutability": "Mut" }, { - "mutability": "Mut", - "span": 153 + "mutability": "Mut" }, { - "mutability": "Mut", - "span": 151 + "mutability": "Mut" }, { - "mutability": "Mut", - "span": 151 + "mutability": "Mut" }, { - "mutability": "Mut", - "span": 153 + "mutability": "Mut" }, { - "mutability": "Mut", - "span": 156 + "mutability": "Mut" } ], - "span": 160, "spread_arg": null, "var_debug_info": [ { @@ -9080,8 +8502,7 @@ "composite": null, "name": "x", "source_info": { - "scope": 0, - "span": 158 + "scope": 0 }, "value": { "Place": { @@ -9095,8 +8516,7 @@ "composite": null, "name": "y", "source_info": { - "scope": 0, - "span": 159 + "scope": 0 }, "value": { "Place": { @@ -9107,7 +8527,6 @@ } ] }, - "id": 6, "name": "test_binop" } }, @@ -9118,129 +8537,83 @@ "mono_item_kind": { "MonoItemFn": { "body": { - "arg_count": 4, + "arg_count": 0, "blocks": [ { "statements": [ - { - "kind": { - "StorageLive": 5 - }, - "span": 1 - }, - { - "kind": { - "StorageLive": 6 - }, - "span": 2 - }, - { - "kind": { - "StorageLive": 8 - }, - "span": 3 - }, { "kind": { "Assign": [ { - "local": 8, + "local": 2, "projection": [] }, { - "Aggregate": [ - { - "Closure": [ - 1, - [ - { - "Type": 1 - }, - { - "Type": 2 - }, - { - "Type": 3 - }, - { - "Type": 4 + "Use": { + "Constant": { + "const_": { + "kind": { + "Allocated": { + "align": 4, + "bytes": [ + 42, + 0, + 0, + 0 + ], + "mutability": "Mut", + "provenance": { + "ptrs": [] + } } - ] - ] - }, - [ - { - "Copy": { - "local": 1, - "projection": [] } - } - ] - ] - } - ] - }, - "span": 3 - }, - { - "kind": { - "Assign": [ - { - "local": 7, - "projection": [] - }, - { - "Ref": [ - { - "kind": "ReErased" - }, - "Shared", - { - "local": 8, - "projection": [] + }, + "user_ty": null } - ] + } } ] - }, - "span": 2 + } }, { "kind": { "Assign": [ { - "local": 6, + "local": 3, "projection": [] }, { - "Cast": [ - { - "PointerCoercion": "Unsize" - }, - { - "Copy": { - "local": 7, - "projection": [] - } - }, - 5 - ] + "Use": { + "Constant": { + "const_": { + "kind": { + "Allocated": { + "align": 4, + "bytes": [ + 10, + 0, + 0, + 0 + ], + "mutability": "Mut", + "provenance": { + "ptrs": [] + } + } + } + }, + "user_ty": null + } + } } ] - }, - "span": 2 + } } ], "terminator": { "kind": { "Call": { "args": [ - { - "Move": { - "local": 6, - "projection": [] - } - }, { "Move": { "local": 2, @@ -9252,214 +8625,115 @@ "local": 3, "projection": [] } - }, - { - "Move": { - "local": 4, - "projection": [] - } } ], "destination": { - "local": 5, + "local": 1, "projection": [] }, "func": { "Constant": { "const_": { - "id": 0, "kind": "ZeroSized" }, - "span": 0, "user_ty": null } }, "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 - } - ], + "statements": [], "terminator": { - "kind": "Return", - "span": 4 + "kind": "Return" } } ], "locals": [ { - "mutability": "Mut", - "span": 8 + "mutability": "Mut" }, { - "mutability": "Not", - "span": 9 + "mutability": "Not" }, { - "mutability": "Not", - "span": 10 + "mutability": "Mut" }, { - "mutability": "Not", - "span": 11 - }, - { - "mutability": "Not", - "span": 12 - }, - { - "mutability": "Mut", - "span": 1 - }, - { - "mutability": "Mut", - "span": 2 - }, - { - "mutability": "Not", - "span": 2 - }, - { - "mutability": "Not", - "span": 3 + "mutability": "Mut" } ], - "span": 13, "spread_arg": null, "var_debug_info": [ { - "argument_index": 1, - "composite": null, - "name": "main", - "source_info": { - "scope": 0, - "span": 9 - }, - "value": { - "Place": { - "local": 1, - "projection": [] - } - } - }, - { - "argument_index": 2, - "composite": null, - "name": "argc", - "source_info": { - "scope": 0, - "span": 10 - }, - "value": { - "Place": { - "local": 2, - "projection": [] - } - } - }, - { - "argument_index": 3, - "composite": null, - "name": "argv", - "source_info": { - "scope": 0, - "span": 11 - }, - "value": { - "Place": { - "local": 3, - "projection": [] - } - } - }, - { - "argument_index": 4, + "argument_index": null, "composite": null, - "name": "sigpipe", + "name": "x", "source_info": { - "scope": 0, - "span": 12 + "scope": 1 }, "value": { - "Place": { - "local": 4, - "projection": [] + "Const": { + "const_": { + "kind": { + "Allocated": { + "align": 4, + "bytes": [ + 42, + 0, + 0, + 0 + ], + "mutability": "Mut", + "provenance": { + "ptrs": [] + } + } + } + }, + "user_ty": null } } }, { "argument_index": null, "composite": null, - "name": "v", + "name": "y", "source_info": { - "scope": 1, - "span": 6 + "scope": 2 }, "value": { - "Place": { - "local": 0, - "projection": [] + "Const": { + "const_": { + "kind": { + "Allocated": { + "align": 4, + "bytes": [ + 10, + 0, + 0, + 0 + ], + "mutability": "Mut", + "provenance": { + "ptrs": [] + } + } + } + }, + "user_ty": null } } } ] }, - "id": 0, - "name": "std::rt::lang_start::<()>" + "name": "main" } }, - "symbol_name": "_ZN3std2rt10lang_start17h" + "symbol_name": "_ZN5binop4main17h" } ], "types": [ @@ -9501,54 +8775,6 @@ } } ], - [ - { - "EnumType": { - "discriminants": [ - 0, - 1 - ], - "fields": "elided", - "layout": { - "abi": { - "Scalar": { - "Initialized": { - "valid_range": { - "end": 18446744073709551615, - "start": 0 - }, - "value": { - "Int": { - "length": "I64", - "signed": true - } - } - } - } - }, - "abi_align": 8, - "fields": { - "Arbitrary": { - "offsets": [ - { - "num_bits": 0 - } - ] - } - }, - "size": { - "num_bits": 64 - }, - "variants": { - "Single": { - "index": 0 - } - } - }, - "name": "std::result::Result" - } - } - ], [ { "StructType": { @@ -9964,39 +9190,6 @@ } } ], - [ - { - "RefType": { - "layout": { - "abi": { - "Scalar": { - "Initialized": { - "valid_range": { - "end": 18446744073709551615, - "start": 1 - }, - "value": { - "Pointer": 0 - } - } - } - }, - "abi_align": 8, - "fields": "Primitive", - "size": { - "num_bits": 64 - }, - "variants": { - "Single": { - "index": 0 - } - } - }, - "mutability": "Not", - "pointee_type": "elided" - } - } - ], [ { "RefType": { diff --git a/tests/integration/programs/char-trivial.smir.json.expected b/tests/integration/expected/nightly-2025-03-01/char-trivial.smir.json.expected similarity index 77% rename from tests/integration/programs/char-trivial.smir.json.expected rename to tests/integration/expected/nightly-2025-03-01/char-trivial.smir.json.expected index 813cd603..c7bfdbc2 100644 --- a/tests/integration/programs/char-trivial.smir.json.expected +++ b/tests/integration/expected/nightly-2025-03-01/char-trivial.smir.json.expected @@ -108,7 +108,6 @@ "Use": { "Constant": { "const_": { - "id": 9, "kind": { "Allocated": { "align": 4, @@ -125,14 +124,12 @@ } } }, - "span": 51, "user_ty": null } } } ] - }, - "span": 52 + } } ], "terminator": { @@ -154,15 +151,13 @@ "otherwise": 2 } } - }, - "span": 50 + } } }, { "statements": [], "terminator": { - "kind": "Return", - "span": 53 + "kind": "Return" } }, { @@ -174,7 +169,6 @@ { "Constant": { "const_": { - "id": 11, "kind": { "Allocated": { "align": 8, @@ -208,7 +202,6 @@ } } }, - "span": 32, "user_ty": null } } @@ -220,36 +213,29 @@ "func": { "Constant": { "const_": { - "id": 10, "kind": "ZeroSized" }, - "span": 54, "user_ty": null } }, "target": null, "unwind": "Continue" } - }, - "span": 54 + } } } ], "locals": [ { - "mutability": "Mut", - "span": 55 + "mutability": "Mut" }, { - "mutability": "Mut", - "span": 52 + "mutability": "Mut" }, { - "mutability": "Mut", - "span": 54 + "mutability": "Mut" } ], - "span": 57, "spread_arg": null, "var_debug_info": [ { @@ -257,13 +243,11 @@ "composite": null, "name": "a", "source_info": { - "scope": 1, - "span": 56 + "scope": 1 }, "value": { "Const": { "const_": { - "id": 9, "kind": { "Allocated": { "align": 4, @@ -280,14 +264,12 @@ } } }, - "span": 51, "user_ty": null } } } ] }, - "id": 6, "name": "main" } }, @@ -298,63 +280,134 @@ "mono_item_kind": { "MonoItemFn": { "body": { - "arg_count": 1, - "blocks": [ - { - "statements": [], - "terminator": { - "kind": "Return", - "span": 44 - } - } - ], - "locals": [ - { - "mutability": "Mut", - "span": 44 - }, - { - "mutability": "Not", - "span": 44 - } - ], - "span": 44, - "spread_arg": null, - "var_debug_info": [] - }, - "id": 4, - "name": "std::ptr::drop_in_place::<{closure@std::rt::lang_start<()>::{closure#0}}>" - } - }, - "symbol_name": "_ZN4core3ptr85drop_in_place$LT$std..rt..lang_start$LT$$LP$$RP$$GT$..$u7b$$u7b$closure$u7d$$u7d$$GT$17h" - }, - { - "details": null, - "mono_item_kind": { - "MonoItemFn": { - "body": { - "arg_count": 1, + "arg_count": 4, "blocks": [ { - "statements": [], + "statements": [ + { + "kind": { + "StorageLive": 5 + } + }, + { + "kind": { + "StorageLive": 7 + } + }, + { + "kind": { + "Assign": [ + { + "local": 7, + "projection": [] + }, + { + "Aggregate": [ + { + "Closure": [ + 0, + [ + { + "Type": 0 + }, + { + "Type": 0 + }, + { + "Type": 0 + }, + { + "Type": 0 + } + ] + ] + }, + [ + { + "Copy": { + "local": 1, + "projection": [] + } + } + ] + ] + } + ] + } + }, + { + "kind": { + "Assign": [ + { + "local": 6, + "projection": [] + }, + { + "Ref": [ + { + "kind": "ReErased" + }, + "Shared", + { + "local": 7, + "projection": [] + } + ] + } + ] + } + }, + { + "kind": { + "Assign": [ + { + "local": 5, + "projection": [] + }, + { + "Cast": [ + { + "PointerCoercion": "Unsize" + }, + { + "Copy": { + "local": 6, + "projection": [] + } + }, + 0 + ] + } + ] + } + } + ], "terminator": { "kind": { "Call": { "args": [ { "Move": { - "local": 1, + "local": 5, "projection": [] } }, { - "Constant": { - "const_": { - "id": 4, - "kind": "ZeroSized" - }, - "span": 32, - "user_ty": null + "Move": { + "local": 2, + "projection": [] + } + }, + { + "Move": { + "local": 3, + "projection": [] + } + }, + { + "Move": { + "local": 4, + "projection": [] } } ], @@ -365,90 +418,69 @@ "func": { "Constant": { "const_": { - "id": 3, "kind": "ZeroSized" }, - "span": 31, "user_ty": null } }, "target": 1, "unwind": "Continue" } - }, - "span": 33 + } } }, { - "statements": [], - "terminator": { - "kind": { - "Call": { - "args": [ - { - "Constant": { - "const_": { - "id": 4, - "kind": "ZeroSized" - }, - "span": 32, - "user_ty": null - } - } - ], - "destination": { - "local": 2, - "projection": [] - }, - "func": { - "Constant": { - "const_": { - "id": 5, - "kind": "ZeroSized" - }, - "span": 34, - "user_ty": null - } - }, - "target": 2, - "unwind": "Unreachable" + "statements": [ + { + "kind": { + "StorageDead": 5 } }, - "span": 35 - } - }, - { - "statements": [], + { + "kind": { + "StorageDead": 7 + } + } + ], "terminator": { - "kind": "Return", - "span": 36 + "kind": "Return" } } ], "locals": [ { - "mutability": "Mut", - "span": 37 + "mutability": "Mut" }, { - "mutability": "Not", - "span": 38 + "mutability": "Not" }, { - "mutability": "Not", - "span": 39 + "mutability": "Not" + }, + { + "mutability": "Not" + }, + { + "mutability": "Not" + }, + { + "mutability": "Mut" + }, + { + "mutability": "Not" + }, + { + "mutability": "Not" } ], - "span": 42, "spread_arg": null, "var_debug_info": [ { "argument_index": 1, "composite": null, - "name": "f", + "name": "main", "source_info": { - "scope": 0, - "span": 38 + "scope": 0 }, "value": { "Place": { @@ -458,46 +490,53 @@ } }, { - "argument_index": null, + "argument_index": 2, "composite": null, - "name": "result", + "name": "argc", "source_info": { - "scope": 1, - "span": 40 + "scope": 0 }, "value": { "Place": { - "local": 0, + "local": 2, "projection": [] } } }, { - "argument_index": 1, + "argument_index": 3, "composite": null, - "name": "dummy", + "name": "argv", "source_info": { - "scope": 2, - "span": 41 + "scope": 0 }, "value": { - "Const": { - "const_": { - "id": 4, - "kind": "ZeroSized" - }, - "span": 32, - "user_ty": null + "Place": { + "local": 3, + "projection": [] + } + } + }, + { + "argument_index": 4, + "composite": null, + "name": "sigpipe", + "source_info": { + "scope": 0 + }, + "value": { + "Place": { + "local": 4, + "projection": [] } } } ] }, - "id": 2, - "name": "std::sys::backtrace::__rust_begin_short_backtrace::" + "name": "std::rt::lang_start::<()>" } }, - "symbol_name": "_ZN3std3sys9backtrace28__rust_begin_short_backtrace17h" + "symbol_name": "_ZN3std2rt10lang_start17h" }, { "details": null, @@ -508,119 +547,26 @@ "blocks": [ { "statements": [ + { + "kind": { + "StorageLive": 2 + } + }, + { + "kind": { + "StorageLive": 3 + } + }, + { + "kind": { + "StorageLive": 4 + } + }, { "kind": { "Assign": [ { - "local": 0, - "projection": [] - }, - { - "Use": { - "Constant": { - "const_": { - "id": 8, - "kind": { - "Allocated": { - "align": 1, - "bytes": [ - 0 - ], - "mutability": "Mut", - "provenance": { - "ptrs": [] - } - } - } - }, - "span": 46, - "user_ty": null - } - } - } - ] - }, - "span": 46 - } - ], - "terminator": { - "kind": "Return", - "span": 45 - } - } - ], - "locals": [ - { - "mutability": "Mut", - "span": 47 - }, - { - "mutability": "Not", - "span": 48 - } - ], - "span": 49, - "spread_arg": null, - "var_debug_info": [ - { - "argument_index": 1, - "composite": null, - "name": "self", - "source_info": { - "scope": 0, - "span": 48 - }, - "value": { - "Const": { - "const_": { - "id": 4, - "kind": "ZeroSized" - }, - "span": 32, - "user_ty": null - } - } - } - ] - }, - "id": 5, - "name": "<() as std::process::Termination>::report" - } - }, - "symbol_name": "_ZN54_$LT$$LP$$RP$$u20$as$u20$std..process..Termination$GT$6report17h" - }, - { - "details": null, - "mono_item_kind": { - "MonoItemFn": { - "body": { - "arg_count": 1, - "blocks": [ - { - "statements": [ - { - "kind": { - "StorageLive": 2 - }, - "span": 16 - }, - { - "kind": { - "StorageLive": 3 - }, - "span": 15 - }, - { - "kind": { - "StorageLive": 4 - }, - "span": 17 - }, - { - "kind": { - "Assign": [ - { - "local": 4, + "local": 4, "projection": [] }, { @@ -632,7 +578,7 @@ { "Field": [ 0, - 7 + 0 ] } ] @@ -640,8 +586,7 @@ } } ] - }, - "span": 17 + } } ], "terminator": { @@ -662,18 +607,15 @@ "func": { "Constant": { "const_": { - "id": 1, "kind": "ZeroSized" }, - "span": 14, "user_ty": null } }, "target": 1, "unwind": "Continue" } - }, - "span": 15 + } } }, { @@ -681,8 +623,7 @@ { "kind": { "StorageDead": 4 - }, - "span": 19 + } } ], "terminator": { @@ -703,18 +644,15 @@ "func": { "Constant": { "const_": { - "id": 2, "kind": "ZeroSized" }, - "span": 18, "user_ty": null } }, "target": 2, "unwind": "Continue" } - }, - "span": 16 + } } }, { @@ -722,14 +660,12 @@ { "kind": { "StorageDead": 3 - }, - "span": 21 + } }, { "kind": { "StorageLive": 5 - }, - "span": 22 + } }, { "kind": { @@ -738,42 +674,6 @@ "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": { @@ -782,13 +682,13 @@ { "Field": [ 0, - 15 + 0 ] }, { "Field": [ 0, - 9 + 0 ] } ] @@ -796,8 +696,7 @@ } } ] - }, - "span": 23 + } }, { "kind": { @@ -811,73 +710,52 @@ "IntToInt", { "Move": { - "local": 6, + "local": 5, "projection": [] } }, - 16 + 0 ] } ] - }, - "span": 24 - }, - { - "kind": { - "StorageDead": 6 - }, - "span": 25 + } }, { "kind": { "StorageDead": 5 - }, - "span": 26 + } }, { "kind": { "StorageDead": 2 - }, - "span": 27 + } } ], "terminator": { - "kind": "Return", - "span": 20 + "kind": "Return" } } ], "locals": [ { - "mutability": "Mut", - "span": 28 + "mutability": "Mut" }, { - "mutability": "Mut", - "span": 3 + "mutability": "Mut" }, { - "mutability": "Mut", - "span": 16 + "mutability": "Mut" }, { - "mutability": "Mut", - "span": 15 + "mutability": "Mut" }, { - "mutability": "Mut", - "span": 17 + "mutability": "Mut" }, { - "mutability": "Mut", - "span": 22 - }, - { - "mutability": "Mut", - "span": 23 + "mutability": "Mut" } ], - "span": 3, "spread_arg": null, "var_debug_info": [ { @@ -885,8 +763,7 @@ "composite": null, "name": "main", "source_info": { - "scope": 0, - "span": 9 + "scope": 0 }, "value": { "Place": { @@ -896,7 +773,7 @@ { "Field": [ 0, - 7 + 0 ] } ] @@ -908,8 +785,7 @@ "composite": null, "name": "self", "source_info": { - "scope": 1, - "span": 29 + "scope": 1 }, "value": { "Place": { @@ -917,25 +793,9 @@ "projection": [] } } - }, - { - "argument_index": 1, - "composite": null, - "name": "self", - "source_info": { - "scope": 2, - "span": 30 - }, - "value": { - "Place": { - "local": 5, - "projection": [] - } - } } ] }, - "id": 1, "name": "std::rt::lang_start::<()>::{closure#0}" } }, @@ -946,62 +806,150 @@ "mono_item_kind": { "MonoItemFn": { "body": { - "arg_count": 2, + "arg_count": 1, "blocks": [ { "statements": [], "terminator": { "kind": { "Call": { - "args": [], + "args": [ + { + "Move": { + "local": 1, + "projection": [] + } + }, + { + "Constant": { + "const_": { + "kind": "ZeroSized" + }, + "user_ty": null + } + } + ], "destination": { "local": 0, "projection": [] }, "func": { - "Move": { - "local": 1, - "projection": [] + "Constant": { + "const_": { + "kind": "ZeroSized" + }, + "user_ty": null } }, "target": 1, "unwind": "Continue" } - }, - "span": 43 + } } }, { "statements": [], "terminator": { - "kind": "Return", - "span": 43 + "kind": { + "Call": { + "args": [ + { + "Constant": { + "const_": { + "kind": "ZeroSized" + }, + "user_ty": null + } + } + ], + "destination": { + "local": 2, + "projection": [] + }, + "func": { + "Constant": { + "const_": { + "kind": "ZeroSized" + }, + "user_ty": null + } + }, + "target": 2, + "unwind": "Unreachable" + } + } + } + }, + { + "statements": [], + "terminator": { + "kind": "Return" } } ], "locals": [ { - "mutability": "Mut", - "span": 43 + "mutability": "Mut" }, { - "mutability": "Not", - "span": 43 + "mutability": "Not" }, { - "mutability": "Not", - "span": 43 + "mutability": "Not" } ], - "span": 43, - "spread_arg": 2, - "var_debug_info": [] + "spread_arg": null, + "var_debug_info": [ + { + "argument_index": 1, + "composite": null, + "name": "f", + "source_info": { + "scope": 0 + }, + "value": { + "Place": { + "local": 1, + "projection": [] + } + } + }, + { + "argument_index": null, + "composite": null, + "name": "result", + "source_info": { + "scope": 1 + }, + "value": { + "Place": { + "local": 0, + "projection": [] + } + } + }, + { + "argument_index": 1, + "composite": null, + "name": "dummy", + "source_info": { + "scope": 2 + }, + "value": { + "Const": { + "const_": { + "kind": "ZeroSized" + }, + "user_ty": null + } + } + } + ] }, - "id": 3, - "name": ">::call_once" + "name": "std::sys::backtrace::__rust_begin_short_backtrace::" } }, - "symbol_name": "_ZN4core3ops8function6FnOnce9call_once17h" + "symbol_name": "_ZN3std3sys9backtrace28__rust_begin_short_backtrace17h" }, { "details": null, @@ -1038,52 +986,98 @@ "func": { "Constant": { "const_": { - "id": 6, "kind": "ZeroSized" }, - "span": 43, "user_ty": null } }, "target": 1, "unwind": "Continue" } - }, - "span": 43 + } } }, { "statements": [], "terminator": { - "kind": "Return", - "span": 43 + "kind": "Return" } } ], "locals": [ { - "mutability": "Mut", - "span": 43 + "mutability": "Mut" }, { - "mutability": "Not", - "span": 43 + "mutability": "Not" }, { - "mutability": "Not", - "span": 43 + "mutability": "Not" } ], - "span": 43, "spread_arg": 2, "var_debug_info": [] }, - "id": 3, "name": "<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once" } }, "symbol_name": "_ZN4core3ops8function6FnOnce40call_once$u7b$$u7b$vtable.shim$u7d$$u7d$17h" }, + { + "details": null, + "mono_item_kind": { + "MonoItemFn": { + "body": { + "arg_count": 2, + "blocks": [ + { + "statements": [], + "terminator": { + "kind": { + "Call": { + "args": [], + "destination": { + "local": 0, + "projection": [] + }, + "func": { + "Move": { + "local": 1, + "projection": [] + } + }, + "target": 1, + "unwind": "Continue" + } + } + } + }, + { + "statements": [], + "terminator": { + "kind": "Return" + } + } + ], + "locals": [ + { + "mutability": "Mut" + }, + { + "mutability": "Not" + }, + { + "mutability": "Not" + } + ], + "spread_arg": 2, + "var_debug_info": [] + }, + "name": ">::call_once" + } + }, + "symbol_name": "_ZN4core3ops8function6FnOnce9call_once17h" + }, { "details": null, "mono_item_kind": { @@ -1117,8 +1111,7 @@ ] } ] - }, - "span": 43 + } } ], "terminator": { @@ -1145,10 +1138,8 @@ "func": { "Constant": { "const_": { - "id": 7, "kind": "ZeroSized" }, - "span": 43, "user_ty": null } }, @@ -1157,8 +1148,7 @@ "Cleanup": 3 } } - }, - "span": 43 + } } }, { @@ -1173,15 +1163,13 @@ "target": 2, "unwind": "Continue" } - }, - "span": 43 + } } }, { "statements": [], "terminator": { - "kind": "Return", - "span": 43 + "kind": "Return" } }, { @@ -1196,222 +1184,77 @@ "target": 4, "unwind": "Terminate" } - }, - "span": 43 - } - }, - { - "statements": [], - "terminator": { - "kind": "Resume", - "span": 43 - } - } - ], - "locals": [ - { - "mutability": "Mut", - "span": 43 - }, - { - "mutability": "Not", - "span": 43 - }, - { - "mutability": "Not", - "span": 43 - }, - { - "mutability": "Not", - "span": 43 - } - ], - "span": 43, - "spread_arg": 2, - "var_debug_info": [] - }, - "id": 3, - "name": "<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once" - } - }, - "symbol_name": "_ZN4core3ops8function6FnOnce9call_once17h" - }, - { - "details": null, - "mono_item_kind": { - "MonoItemFn": { - "body": { - "arg_count": 4, - "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": { - "args": [ - { - "Move": { - "local": 6, - "projection": [] - } - }, - { - "Move": { - "local": 2, - "projection": [] - } - }, - { - "Move": { - "local": 3, - "projection": [] - } - }, - { - "Move": { - "local": 4, - "projection": [] - } - } - ], - "destination": { - "local": 5, - "projection": [] - }, - "func": { - "Constant": { - "const_": { - "id": 0, - "kind": "ZeroSized" - }, - "span": 0, - "user_ty": null - } - }, - "target": 1, - "unwind": "Continue" - } - }, - "span": 1 } }, + { + "statements": [], + "terminator": { + "kind": "Resume" + } + } + ], + "locals": [ + { + "mutability": "Mut" + }, + { + "mutability": "Not" + }, + { + "mutability": "Not" + }, + { + "mutability": "Not" + } + ], + "spread_arg": 2, + "var_debug_info": [] + }, + "name": "<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once" + } + }, + "symbol_name": "_ZN4core3ops8function6FnOnce9call_once17h" + }, + { + "details": null, + "mono_item_kind": { + "MonoItemFn": { + "body": { + "arg_count": 1, + "blocks": [ + { + "statements": [], + "terminator": { + "kind": "Return" + } + } + ], + "locals": [ + { + "mutability": "Mut" + }, + { + "mutability": "Not" + } + ], + "spread_arg": null, + "var_debug_info": [] + }, + "name": "std::ptr::drop_in_place::<{closure@std::rt::lang_start<()>::{closure#0}}>" + } + }, + "symbol_name": "_ZN4core3ptr85drop_in_place$LT$std..rt..lang_start$LT$$LP$$RP$$GT$..$u7b$$u7b$closure$u7d$$u7d$$GT$17h" + }, + { + "details": null, + "mono_item_kind": { + "MonoItemFn": { + "body": { + "arg_count": 1, + "blocks": [ { "statements": [ - { - "kind": { - "StorageDead": 6 - }, - "span": 5 - }, { "kind": { "Assign": [ @@ -1421,168 +1264,49 @@ }, { "Use": { - "Copy": { - "local": 5, - "projection": [ - { - "Downcast": 0 - }, - { - "Field": [ - 0, - 6 - ] + "Constant": { + "const_": { + "kind": { + "Allocated": { + "align": 1, + "bytes": [ + 0 + ], + "mutability": "Mut", + "provenance": { + "ptrs": [] + } + } } - ] + }, + "user_ty": null } } } ] - }, - "span": 6 - }, - { - "kind": { - "StorageDead": 8 - }, - "span": 7 - }, - { - "kind": { - "StorageDead": 5 - }, - "span": 7 + } } ], "terminator": { - "kind": "Return", - "span": 4 + "kind": "Return" } } ], "locals": [ { - "mutability": "Mut", - "span": 8 - }, - { - "mutability": "Not", - "span": 9 - }, - { - "mutability": "Not", - "span": 10 - }, - { - "mutability": "Not", - "span": 11 - }, - { - "mutability": "Not", - "span": 12 - }, - { - "mutability": "Mut", - "span": 1 - }, - { - "mutability": "Mut", - "span": 2 - }, - { - "mutability": "Not", - "span": 2 + "mutability": "Mut" }, { - "mutability": "Not", - "span": 3 + "mutability": "Not" } ], - "span": 13, "spread_arg": null, - "var_debug_info": [ - { - "argument_index": 1, - "composite": null, - "name": "main", - "source_info": { - "scope": 0, - "span": 9 - }, - "value": { - "Place": { - "local": 1, - "projection": [] - } - } - }, - { - "argument_index": 2, - "composite": null, - "name": "argc", - "source_info": { - "scope": 0, - "span": 10 - }, - "value": { - "Place": { - "local": 2, - "projection": [] - } - } - }, - { - "argument_index": 3, - "composite": null, - "name": "argv", - "source_info": { - "scope": 0, - "span": 11 - }, - "value": { - "Place": { - "local": 3, - "projection": [] - } - } - }, - { - "argument_index": 4, - "composite": null, - "name": "sigpipe", - "source_info": { - "scope": 0, - "span": 12 - }, - "value": { - "Place": { - "local": 4, - "projection": [] - } - } - }, - { - "argument_index": null, - "composite": null, - "name": "v", - "source_info": { - "scope": 1, - "span": 6 - }, - "value": { - "Place": { - "local": 0, - "projection": [] - } - } - } - ] + "var_debug_info": [] }, - "id": 0, - "name": "std::rt::lang_start::<()>" + "name": "<() as std::process::Termination>::report" } }, - "symbol_name": "_ZN3std2rt10lang_start17h" + "symbol_name": "_ZN54_$LT$$LP$$RP$$u20$as$u20$std..process..Termination$GT$6report17h" } ], "types": [ @@ -1624,54 +1348,6 @@ } } ], - [ - { - "EnumType": { - "discriminants": [ - 0, - 1 - ], - "fields": "elided", - "layout": { - "abi": { - "Scalar": { - "Initialized": { - "valid_range": { - "end": 18446744073709551615, - "start": 0 - }, - "value": { - "Int": { - "length": "I64", - "signed": true - } - } - } - } - }, - "abi_align": 8, - "fields": { - "Arbitrary": { - "offsets": [ - { - "num_bits": 0 - } - ] - } - }, - "size": { - "num_bits": 64 - }, - "variants": { - "Single": { - "index": 0 - } - } - }, - "name": "std::result::Result" - } - } - ], [ { "StructType": { @@ -2025,39 +1701,6 @@ } } ], - [ - { - "RefType": { - "layout": { - "abi": { - "Scalar": { - "Initialized": { - "valid_range": { - "end": 18446744073709551615, - "start": 1 - }, - "value": { - "Pointer": 0 - } - } - } - }, - "abi_align": 8, - "fields": "Primitive", - "size": { - "num_bits": 64 - }, - "variants": { - "Single": { - "index": 0 - } - } - }, - "mutability": "Not", - "pointee_type": "elided" - } - } - ], [ { "RefType": { diff --git a/tests/integration/programs/closure-args.smir.json.expected b/tests/integration/expected/nightly-2025-03-01/closure-args.smir.json.expected similarity index 79% rename from tests/integration/programs/closure-args.smir.json.expected rename to tests/integration/expected/nightly-2025-03-01/closure-args.smir.json.expected index 72c44917..4ed8a99f 100644 --- a/tests/integration/programs/closure-args.smir.json.expected +++ b/tests/integration/expected/nightly-2025-03-01/closure-args.smir.json.expected @@ -131,8 +131,7 @@ ] } ] - }, - "span": 50 + } }, { "kind": { @@ -148,7 +147,6 @@ { "Constant": { "const_": { - "id": 10, "kind": { "Allocated": { "align": 4, @@ -165,14 +163,12 @@ } } }, - "span": 52, "user_ty": null } }, { "Constant": { "const_": { - "id": 11, "kind": { "Allocated": { "align": 4, @@ -189,7 +185,6 @@ } } }, - "span": 53, "user_ty": null } } @@ -197,8 +192,7 @@ ] } ] - }, - "span": 51 + } } ], "terminator": { @@ -225,18 +219,15 @@ "func": { "Constant": { "const_": { - "id": 9, "kind": "ZeroSized" }, - "span": 50, "user_ty": null } }, "target": 1, "unwind": "Continue" } - }, - "span": 51 + } } }, { @@ -260,15 +251,13 @@ "otherwise": 3 } } - }, - "span": 54 + } } }, { "statements": [], "terminator": { - "kind": "Return", - "span": 55 + "kind": "Return" } }, { @@ -280,7 +269,6 @@ { "Constant": { "const_": { - "id": 13, "kind": { "Allocated": { "align": 8, @@ -314,7 +302,6 @@ } } }, - "span": 32, "user_ty": null } } @@ -326,48 +313,38 @@ "func": { "Constant": { "const_": { - "id": 12, "kind": "ZeroSized" }, - "span": 56, "user_ty": null } }, "target": null, "unwind": "Continue" } - }, - "span": 56 + } } } ], "locals": [ { - "mutability": "Mut", - "span": 57 + "mutability": "Mut" }, { - "mutability": "Not", - "span": 58 + "mutability": "Not" }, { - "mutability": "Mut", - "span": 51 + "mutability": "Mut" }, { - "mutability": "Mut", - "span": 50 + "mutability": "Mut" }, { - "mutability": "Mut", - "span": 51 + "mutability": "Mut" }, { - "mutability": "Mut", - "span": 56 + "mutability": "Mut" } ], - "span": 59, "spread_arg": null, "var_debug_info": [ { @@ -375,23 +352,19 @@ "composite": null, "name": "sum", "source_info": { - "scope": 1, - "span": 58 + "scope": 1 }, "value": { "Const": { "const_": { - "id": 14, "kind": "ZeroSized" }, - "span": 32, "user_ty": null } } } ] }, - "id": 6, "name": "main" } }, @@ -402,296 +375,427 @@ "mono_item_kind": { "MonoItemFn": { "body": { - "arg_count": 1, - "blocks": [ - { - "statements": [], - "terminator": { - "kind": "Return", - "span": 44 - } - } - ], - "locals": [ - { - "mutability": "Mut", - "span": 44 - }, - { - "mutability": "Not", - "span": 44 - } - ], - "span": 44, - "spread_arg": null, - "var_debug_info": [] - }, - "id": 4, - "name": "std::ptr::drop_in_place::<{closure@std::rt::lang_start<()>::{closure#0}}>" - } - }, - "symbol_name": "_ZN4core3ptr85drop_in_place$LT$std..rt..lang_start$LT$$LP$$RP$$GT$..$u7b$$u7b$closure$u7d$$u7d$$GT$17h" - }, - { - "details": null, - "mono_item_kind": { - "MonoItemFn": { - "body": { - "arg_count": 1, + "arg_count": 3, "blocks": [ { - "statements": [], - "terminator": { - "kind": { - "Call": { - "args": [ + "statements": [ + { + "kind": { + "Assign": [ { - "Move": { - "local": 1, - "projection": [] - } + "local": 4, + "projection": [] }, { - "Constant": { - "const_": { - "id": 4, - "kind": "ZeroSized" + "CheckedBinaryOp": [ + "Add", + { + "Copy": { + "local": 2, + "projection": [] + } }, - "span": 32, - "user_ty": null - } + { + "Copy": { + "local": 3, + "projection": [] + } + } + ] + } + ] + } + } + ], + "terminator": { + "kind": { + "Assert": { + "cond": { + "Move": { + "local": 4, + "projection": [ + { + "Field": [ + 1, + 0 + ] + } + ] } - ], - "destination": { - "local": 0, - "projection": [] }, - "func": { - "Constant": { - "const_": { - "id": 3, - "kind": "ZeroSized" + "expected": false, + "msg": { + "Overflow": [ + "Add", + { + "Copy": { + "local": 2, + "projection": [] + } }, - "span": 31, - "user_ty": null - } + { + "Copy": { + "local": 3, + "projection": [] + } + } + ] }, "target": 1, "unwind": "Continue" } - }, - "span": 33 + } } }, { - "statements": [], - "terminator": { - "kind": { - "Call": { - "args": [ + "statements": [ + { + "kind": { + "Assign": [ { - "Constant": { - "const_": { - "id": 4, - "kind": "ZeroSized" - }, - "span": 32, - "user_ty": null + "local": 0, + "projection": [] + }, + { + "Use": { + "Move": { + "local": 4, + "projection": [ + { + "Field": [ + 0, + 0 + ] + } + ] + } } } - ], - "destination": { - "local": 2, - "projection": [] - }, - "func": { - "Constant": { - "const_": { - "id": 5, - "kind": "ZeroSized" - }, - "span": 34, - "user_ty": null - } - }, - "target": 2, - "unwind": "Unreachable" + ] } - }, - "span": 35 - } - }, - { - "statements": [], + } + ], "terminator": { - "kind": "Return", - "span": 36 + "kind": "Return" } } ], "locals": [ { - "mutability": "Mut", - "span": 37 + "mutability": "Mut" + }, + { + "mutability": "Mut" + }, + { + "mutability": "Not" }, { - "mutability": "Not", - "span": 38 + "mutability": "Not" }, { - "mutability": "Not", - "span": 39 + "mutability": "Mut" } ], - "span": 42, "spread_arg": null, "var_debug_info": [ { - "argument_index": 1, + "argument_index": 2, "composite": null, - "name": "f", + "name": "x", "source_info": { - "scope": 0, - "span": 38 + "scope": 0 }, "value": { "Place": { - "local": 1, + "local": 2, "projection": [] } } }, { - "argument_index": null, + "argument_index": 3, "composite": null, - "name": "result", + "name": "y", "source_info": { - "scope": 1, - "span": 40 + "scope": 0 }, "value": { "Place": { - "local": 0, + "local": 3, "projection": [] } } - }, - { - "argument_index": 1, - "composite": null, - "name": "dummy", - "source_info": { - "scope": 2, - "span": 41 - }, - "value": { - "Const": { - "const_": { - "id": 4, - "kind": "ZeroSized" - }, - "span": 32, - "user_ty": null - } - } } ] }, - "id": 2, - "name": "std::sys::backtrace::__rust_begin_short_backtrace::" + "name": "main::{closure#0}" } }, - "symbol_name": "_ZN3std3sys9backtrace28__rust_begin_short_backtrace17h" + "symbol_name": "_ZN12closure_args4main28_$u7b$$u7b$closure$u7d$$u7d$17h" }, { "details": null, "mono_item_kind": { "MonoItemFn": { "body": { - "arg_count": 1, + "arg_count": 4, "blocks": [ { "statements": [ + { + "kind": { + "StorageLive": 5 + } + }, + { + "kind": { + "StorageLive": 7 + } + }, { "kind": { "Assign": [ { - "local": 0, + "local": 7, "projection": [] }, { - "Use": { - "Constant": { - "const_": { - "id": 8, - "kind": { - "Allocated": { - "align": 1, - "bytes": [ - 0 - ], - "mutability": "Mut", - "provenance": { - "ptrs": [] - } + "Aggregate": [ + { + "Closure": [ + 0, + [ + { + "Type": 0 + }, + { + "Type": 0 + }, + { + "Type": 0 + }, + { + "Type": 0 } + ] + ] + }, + [ + { + "Copy": { + "local": 1, + "projection": [] } - }, - "span": 46, - "user_ty": null - } - } + } + ] + ] } ] - }, - "span": 46 + } + }, + { + "kind": { + "Assign": [ + { + "local": 6, + "projection": [] + }, + { + "Ref": [ + { + "kind": "ReErased" + }, + "Shared", + { + "local": 7, + "projection": [] + } + ] + } + ] + } + }, + { + "kind": { + "Assign": [ + { + "local": 5, + "projection": [] + }, + { + "Cast": [ + { + "PointerCoercion": "Unsize" + }, + { + "Copy": { + "local": 6, + "projection": [] + } + }, + 0 + ] + } + ] + } + } + ], + "terminator": { + "kind": { + "Call": { + "args": [ + { + "Move": { + "local": 5, + "projection": [] + } + }, + { + "Move": { + "local": 2, + "projection": [] + } + }, + { + "Move": { + "local": 3, + "projection": [] + } + }, + { + "Move": { + "local": 4, + "projection": [] + } + } + ], + "destination": { + "local": 0, + "projection": [] + }, + "func": { + "Constant": { + "const_": { + "kind": "ZeroSized" + }, + "user_ty": null + } + }, + "target": 1, + "unwind": "Continue" + } + } + } + }, + { + "statements": [ + { + "kind": { + "StorageDead": 5 + } + }, + { + "kind": { + "StorageDead": 7 + } } ], "terminator": { - "kind": "Return", - "span": 45 + "kind": "Return" } } ], "locals": [ { - "mutability": "Mut", - "span": 47 + "mutability": "Mut" + }, + { + "mutability": "Not" + }, + { + "mutability": "Not" + }, + { + "mutability": "Not" + }, + { + "mutability": "Not" + }, + { + "mutability": "Mut" + }, + { + "mutability": "Not" }, { - "mutability": "Not", - "span": 48 + "mutability": "Not" } ], - "span": 49, "spread_arg": null, "var_debug_info": [ { "argument_index": 1, "composite": null, - "name": "self", + "name": "main", "source_info": { - "scope": 0, - "span": 48 + "scope": 0 }, "value": { - "Const": { - "const_": { - "id": 4, - "kind": "ZeroSized" - }, - "span": 32, - "user_ty": null + "Place": { + "local": 1, + "projection": [] + } + } + }, + { + "argument_index": 2, + "composite": null, + "name": "argc", + "source_info": { + "scope": 0 + }, + "value": { + "Place": { + "local": 2, + "projection": [] + } + } + }, + { + "argument_index": 3, + "composite": null, + "name": "argv", + "source_info": { + "scope": 0 + }, + "value": { + "Place": { + "local": 3, + "projection": [] + } + } + }, + { + "argument_index": 4, + "composite": null, + "name": "sigpipe", + "source_info": { + "scope": 0 + }, + "value": { + "Place": { + "local": 4, + "projection": [] } } } ] }, - "id": 5, - "name": "<() as std::process::Termination>::report" + "name": "std::rt::lang_start::<()>" } }, - "symbol_name": "_ZN54_$LT$$LP$$RP$$u20$as$u20$std..process..Termination$GT$6report17h" + "symbol_name": "_ZN3std2rt10lang_start17h" }, { "details": null, @@ -705,20 +809,17 @@ { "kind": { "StorageLive": 2 - }, - "span": 16 + } }, { "kind": { "StorageLive": 3 - }, - "span": 15 + } }, { "kind": { "StorageLive": 4 - }, - "span": 17 + } }, { "kind": { @@ -736,7 +837,7 @@ { "Field": [ 0, - 7 + 0 ] } ] @@ -744,8 +845,7 @@ } } ] - }, - "span": 17 + } } ], "terminator": { @@ -766,18 +866,15 @@ "func": { "Constant": { "const_": { - "id": 1, "kind": "ZeroSized" }, - "span": 14, "user_ty": null } }, "target": 1, "unwind": "Continue" } - }, - "span": 15 + } } }, { @@ -785,8 +882,7 @@ { "kind": { "StorageDead": 4 - }, - "span": 19 + } } ], "terminator": { @@ -807,18 +903,15 @@ "func": { "Constant": { "const_": { - "id": 2, "kind": "ZeroSized" }, - "span": 18, "user_ty": null } }, "target": 2, "unwind": "Continue" } - }, - "span": 16 + } } }, { @@ -826,14 +919,12 @@ { "kind": { "StorageDead": 3 - }, - "span": 21 + } }, { "kind": { "StorageLive": 5 - }, - "span": 22 + } }, { "kind": { @@ -842,42 +933,6 @@ "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": { @@ -886,13 +941,13 @@ { "Field": [ 0, - 15 + 0 ] }, { "Field": [ 0, - 9 + 0 ] } ] @@ -900,8 +955,7 @@ } } ] - }, - "span": 23 + } }, { "kind": { @@ -915,73 +969,52 @@ "IntToInt", { "Move": { - "local": 6, + "local": 5, "projection": [] } }, - 16 + 0 ] } ] - }, - "span": 24 - }, - { - "kind": { - "StorageDead": 6 - }, - "span": 25 + } }, { "kind": { "StorageDead": 5 - }, - "span": 26 + } }, { "kind": { "StorageDead": 2 - }, - "span": 27 + } } ], "terminator": { - "kind": "Return", - "span": 20 + "kind": "Return" } } ], "locals": [ { - "mutability": "Mut", - "span": 28 - }, - { - "mutability": "Mut", - "span": 3 + "mutability": "Mut" }, { - "mutability": "Mut", - "span": 16 + "mutability": "Mut" }, { - "mutability": "Mut", - "span": 15 + "mutability": "Mut" }, { - "mutability": "Mut", - "span": 17 + "mutability": "Mut" }, { - "mutability": "Mut", - "span": 22 + "mutability": "Mut" }, { - "mutability": "Mut", - "span": 23 + "mutability": "Mut" } ], - "span": 3, "spread_arg": null, "var_debug_info": [ { @@ -989,8 +1022,7 @@ "composite": null, "name": "main", "source_info": { - "scope": 0, - "span": 9 + "scope": 0 }, "value": { "Place": { @@ -1000,7 +1032,7 @@ { "Field": [ 0, - 7 + 0 ] } ] @@ -1012,8 +1044,7 @@ "composite": null, "name": "self", "source_info": { - "scope": 1, - "span": 29 + "scope": 1 }, "value": { "Place": { @@ -1021,25 +1052,9 @@ "projection": [] } } - }, - { - "argument_index": 1, - "composite": null, - "name": "self", - "source_info": { - "scope": 2, - "span": 30 - }, - "value": { - "Place": { - "local": 5, - "projection": [] - } - } } ] }, - "id": 1, "name": "std::rt::lang_start::<()>::{closure#0}" } }, @@ -1050,70 +1065,47 @@ "mono_item_kind": { "MonoItemFn": { "body": { - "arg_count": 2, + "arg_count": 1, "blocks": [ { "statements": [], "terminator": { "kind": { "Call": { - "args": [], - "destination": { + "args": [ + { + "Move": { + "local": 1, + "projection": [] + } + }, + { + "Constant": { + "const_": { + "kind": "ZeroSized" + }, + "user_ty": null + } + } + ], + "destination": { "local": 0, "projection": [] }, "func": { - "Move": { - "local": 1, - "projection": [] + "Constant": { + "const_": { + "kind": "ZeroSized" + }, + "user_ty": null } }, "target": 1, "unwind": "Continue" } - }, - "span": 43 - } - }, - { - "statements": [], - "terminator": { - "kind": "Return", - "span": 43 + } } - } - ], - "locals": [ - { - "mutability": "Mut", - "span": 43 - }, - { - "mutability": "Not", - "span": 43 }, - { - "mutability": "Not", - "span": 43 - } - ], - "span": 43, - "spread_arg": 2, - "var_debug_info": [] - }, - "id": 3, - "name": ">::call_once" - } - }, - "symbol_name": "_ZN4core3ops8function6FnOnce9call_once17h" - }, - { - "details": null, - "mono_item_kind": { - "MonoItemFn": { - "body": { - "arg_count": 2, - "blocks": [ { "statements": [], "terminator": { @@ -1121,72 +1113,102 @@ "Call": { "args": [ { - "Move": { - "local": 1, - "projection": [ - "Deref" - ] - } - }, - { - "Move": { - "local": 2, - "projection": [] + "Constant": { + "const_": { + "kind": "ZeroSized" + }, + "user_ty": null } } ], "destination": { - "local": 0, + "local": 2, "projection": [] }, "func": { "Constant": { "const_": { - "id": 6, "kind": "ZeroSized" }, - "span": 43, "user_ty": null } }, - "target": 1, - "unwind": "Continue" + "target": 2, + "unwind": "Unreachable" } - }, - "span": 43 + } } }, { "statements": [], "terminator": { - "kind": "Return", - "span": 43 + "kind": "Return" } } ], "locals": [ { - "mutability": "Mut", - "span": 43 + "mutability": "Mut" }, { - "mutability": "Not", - "span": 43 + "mutability": "Not" }, { - "mutability": "Not", - "span": 43 + "mutability": "Not" } ], - "span": 43, - "spread_arg": 2, - "var_debug_info": [] + "spread_arg": null, + "var_debug_info": [ + { + "argument_index": 1, + "composite": null, + "name": "f", + "source_info": { + "scope": 0 + }, + "value": { + "Place": { + "local": 1, + "projection": [] + } + } + }, + { + "argument_index": null, + "composite": null, + "name": "result", + "source_info": { + "scope": 1 + }, + "value": { + "Place": { + "local": 0, + "projection": [] + } + } + }, + { + "argument_index": 1, + "composite": null, + "name": "dummy", + "source_info": { + "scope": 2 + }, + "value": { + "Const": { + "const_": { + "kind": "ZeroSized" + }, + "user_ty": null + } + } + } + ] }, - "id": 3, - "name": "<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once" + "name": "std::sys::backtrace::__rust_begin_short_backtrace::" } }, - "symbol_name": "_ZN4core3ops8function6FnOnce40call_once$u7b$$u7b$vtable.shim$u7d$$u7d$17h" + "symbol_name": "_ZN3std3sys9backtrace28__rust_begin_short_backtrace17h" }, { "details": null, @@ -1196,43 +1218,17 @@ "arg_count": 2, "blocks": [ { - "statements": [ - { - "kind": { - "Assign": [ - { - "local": 3, - "projection": [] - }, - { - "Ref": [ - { - "kind": "ReErased" - }, - { - "Mut": { - "kind": "Default" - } - }, - { - "local": 1, - "projection": [] - } - ] - } - ] - }, - "span": 43 - } - ], + "statements": [], "terminator": { "kind": { "Call": { "args": [ { "Move": { - "local": 3, - "projection": [] + "local": 1, + "projection": [ + "Deref" + ] } }, { @@ -1249,348 +1245,112 @@ "func": { "Constant": { "const_": { - "id": 7, "kind": "ZeroSized" }, - "span": 43, "user_ty": null } }, "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 + "kind": "Return" } } ], "locals": [ { - "mutability": "Mut", - "span": 43 + "mutability": "Mut" }, { - "mutability": "Not", - "span": 43 + "mutability": "Not" }, { - "mutability": "Not", - "span": 43 - }, - { - "mutability": "Not", - "span": 43 + "mutability": "Not" } ], - "span": 43, "spread_arg": 2, "var_debug_info": [] }, - "id": 3, "name": "<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once" } }, - "symbol_name": "_ZN4core3ops8function6FnOnce9call_once17h" + "symbol_name": "_ZN4core3ops8function6FnOnce40call_once$u7b$$u7b$vtable.shim$u7d$$u7d$17h" }, { "details": null, "mono_item_kind": { "MonoItemFn": { "body": { - "arg_count": 3, + "arg_count": 2, "blocks": [ { - "statements": [ - { - "kind": { - "Assign": [ - { - "local": 4, - "projection": [] - }, - { - "CheckedBinaryOp": [ - "Add", - { - "Copy": { - "local": 2, - "projection": [] - } - }, - { - "Copy": { - "local": 3, - "projection": [] - } - } - ] - } - ] - }, - "span": 60 - } - ], + "statements": [], "terminator": { "kind": { - "Assert": { - "cond": { + "Call": { + "args": [], + "destination": { + "local": 0, + "projection": [] + }, + "func": { "Move": { - "local": 4, - "projection": [ - { - "Field": [ - 1, - 32 - ] - } - ] + "local": 1, + "projection": [] } }, - "expected": false, - "msg": { - "Overflow": [ - "Add", - { - "Copy": { - "local": 2, - "projection": [] - } - }, - { - "Copy": { - "local": 3, - "projection": [] - } - } - ] - }, "target": 1, "unwind": "Continue" } - }, - "span": 60 + } } }, { - "statements": [ - { - "kind": { - "Assign": [ - { - "local": 0, - "projection": [] - }, - { - "Use": { - "Move": { - "local": 4, - "projection": [ - { - "Field": [ - 0, - 16 - ] - } - ] - } - } - } - ] - }, - "span": 60 - } - ], + "statements": [], "terminator": { - "kind": "Return", - "span": 61 + "kind": "Return" } } ], "locals": [ { - "mutability": "Mut", - "span": 62 - }, - { - "mutability": "Mut", - "span": 63 - }, - { - "mutability": "Not", - "span": 64 + "mutability": "Mut" }, { - "mutability": "Not", - "span": 65 + "mutability": "Not" }, { - "mutability": "Mut", - "span": 60 + "mutability": "Not" } ], - "span": 63, - "spread_arg": null, - "var_debug_info": [ - { - "argument_index": 2, - "composite": null, - "name": "x", - "source_info": { - "scope": 0, - "span": 64 - }, - "value": { - "Place": { - "local": 2, - "projection": [] - } - } - }, - { - "argument_index": 3, - "composite": null, - "name": "y", - "source_info": { - "scope": 0, - "span": 65 - }, - "value": { - "Place": { - "local": 3, - "projection": [] - } - } - } - ] + "spread_arg": 2, + "var_debug_info": [] }, - "id": 7, - "name": "main::{closure#0}" + "name": ">::call_once" } }, - "symbol_name": "_ZN12closure_args4main28_$u7b$$u7b$closure$u7d$$u7d$17h" + "symbol_name": "_ZN4core3ops8function6FnOnce9call_once17h" }, { "details": null, "mono_item_kind": { "MonoItemFn": { "body": { - "arg_count": 4, + "arg_count": 2, "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, + "local": 3, "projection": [] }, { @@ -1598,59 +1358,25 @@ { "kind": "ReErased" }, - "Shared", - { - "local": 8, - "projection": [] - } - ] - } - ] - }, - "span": 2 - }, - { - "kind": { - "Assign": [ - { - "local": 6, - "projection": [] - }, - { - "Cast": [ - { - "PointerCoercion": "Unsize" - }, { - "Copy": { - "local": 7, - "projection": [] + "Mut": { + "kind": "Default" } }, - 5 + { + "local": 1, + "projection": [] + } ] } ] - }, - "span": 2 + } } ], "terminator": { "kind": { "Call": { "args": [ - { - "Move": { - "local": 6, - "projection": [] - } - }, - { - "Move": { - "local": 2, - "projection": [] - } - }, { "Move": { "local": 3, @@ -1659,40 +1385,135 @@ }, { "Move": { - "local": 4, + "local": 2, "projection": [] } } ], "destination": { - "local": 5, + "local": 0, "projection": [] }, "func": { "Constant": { "const_": { - "id": 0, "kind": "ZeroSized" }, - "span": 0, "user_ty": null } }, "target": 1, + "unwind": { + "Cleanup": 3 + } + } + } + } + }, + { + "statements": [], + "terminator": { + "kind": { + "Drop": { + "place": { + "local": 1, + "projection": [] + }, + "target": 2, "unwind": "Continue" } - }, - "span": 1 + } + } + }, + { + "statements": [], + "terminator": { + "kind": "Return" + } + }, + { + "statements": [], + "terminator": { + "kind": { + "Drop": { + "place": { + "local": 1, + "projection": [] + }, + "target": 4, + "unwind": "Terminate" + } + } } }, + { + "statements": [], + "terminator": { + "kind": "Resume" + } + } + ], + "locals": [ + { + "mutability": "Mut" + }, + { + "mutability": "Not" + }, + { + "mutability": "Not" + }, + { + "mutability": "Not" + } + ], + "spread_arg": 2, + "var_debug_info": [] + }, + "name": "<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once" + } + }, + "symbol_name": "_ZN4core3ops8function6FnOnce9call_once17h" + }, + { + "details": null, + "mono_item_kind": { + "MonoItemFn": { + "body": { + "arg_count": 1, + "blocks": [ + { + "statements": [], + "terminator": { + "kind": "Return" + } + } + ], + "locals": [ + { + "mutability": "Mut" + }, + { + "mutability": "Not" + } + ], + "spread_arg": null, + "var_debug_info": [] + }, + "name": "std::ptr::drop_in_place::<{closure@std::rt::lang_start<()>::{closure#0}}>" + } + }, + "symbol_name": "_ZN4core3ptr85drop_in_place$LT$std..rt..lang_start$LT$$LP$$RP$$GT$..$u7b$$u7b$closure$u7d$$u7d$$GT$17h" + }, + { + "details": null, + "mono_item_kind": { + "MonoItemFn": { + "body": { + "arg_count": 1, + "blocks": [ { "statements": [ - { - "kind": { - "StorageDead": 6 - }, - "span": 5 - }, { "kind": { "Assign": [ @@ -1702,168 +1523,49 @@ }, { "Use": { - "Copy": { - "local": 5, - "projection": [ - { - "Downcast": 0 - }, - { - "Field": [ - 0, - 6 - ] + "Constant": { + "const_": { + "kind": { + "Allocated": { + "align": 1, + "bytes": [ + 0 + ], + "mutability": "Mut", + "provenance": { + "ptrs": [] + } + } } - ] + }, + "user_ty": null } } } ] - }, - "span": 6 - }, - { - "kind": { - "StorageDead": 8 - }, - "span": 7 - }, - { - "kind": { - "StorageDead": 5 - }, - "span": 7 + } } ], "terminator": { - "kind": "Return", - "span": 4 + "kind": "Return" } } ], "locals": [ { - "mutability": "Mut", - "span": 8 - }, - { - "mutability": "Not", - "span": 9 - }, - { - "mutability": "Not", - "span": 10 - }, - { - "mutability": "Not", - "span": 11 - }, - { - "mutability": "Not", - "span": 12 - }, - { - "mutability": "Mut", - "span": 1 - }, - { - "mutability": "Mut", - "span": 2 - }, - { - "mutability": "Not", - "span": 2 + "mutability": "Mut" }, { - "mutability": "Not", - "span": 3 + "mutability": "Not" } ], - "span": 13, "spread_arg": null, - "var_debug_info": [ - { - "argument_index": 1, - "composite": null, - "name": "main", - "source_info": { - "scope": 0, - "span": 9 - }, - "value": { - "Place": { - "local": 1, - "projection": [] - } - } - }, - { - "argument_index": 2, - "composite": null, - "name": "argc", - "source_info": { - "scope": 0, - "span": 10 - }, - "value": { - "Place": { - "local": 2, - "projection": [] - } - } - }, - { - "argument_index": 3, - "composite": null, - "name": "argv", - "source_info": { - "scope": 0, - "span": 11 - }, - "value": { - "Place": { - "local": 3, - "projection": [] - } - } - }, - { - "argument_index": 4, - "composite": null, - "name": "sigpipe", - "source_info": { - "scope": 0, - "span": 12 - }, - "value": { - "Place": { - "local": 4, - "projection": [] - } - } - }, - { - "argument_index": null, - "composite": null, - "name": "v", - "source_info": { - "scope": 1, - "span": 6 - }, - "value": { - "Place": { - "local": 0, - "projection": [] - } - } - } - ] + "var_debug_info": [] }, - "id": 0, - "name": "std::rt::lang_start::<()>" + "name": "<() as std::process::Termination>::report" } }, - "symbol_name": "_ZN3std2rt10lang_start17h" + "symbol_name": "_ZN54_$LT$$LP$$RP$$u20$as$u20$std..process..Termination$GT$6report17h" } ], "types": [ @@ -1905,54 +1607,6 @@ } } ], - [ - { - "EnumType": { - "discriminants": [ - 0, - 1 - ], - "fields": "elided", - "layout": { - "abi": { - "Scalar": { - "Initialized": { - "valid_range": { - "end": 18446744073709551615, - "start": 0 - }, - "value": { - "Int": { - "length": "I64", - "signed": true - } - } - } - } - }, - "abi_align": 8, - "fields": { - "Arbitrary": { - "offsets": [ - { - "num_bits": 0 - } - ] - } - }, - "size": { - "num_bits": 64 - }, - "variants": { - "Single": { - "index": 0 - } - } - }, - "name": "std::result::Result" - } - } - ], [ { "StructType": { @@ -2463,39 +2117,6 @@ } } ], - [ - { - "RefType": { - "layout": { - "abi": { - "Scalar": { - "Initialized": { - "valid_range": { - "end": 18446744073709551615, - "start": 1 - }, - "value": { - "Pointer": 0 - } - } - } - }, - "abi_align": 8, - "fields": "Primitive", - "size": { - "num_bits": 64 - }, - "variants": { - "Single": { - "index": 0 - } - } - }, - "mutability": "Not", - "pointee_type": "elided" - } - } - ], [ { "RefType": { diff --git a/tests/integration/programs/closure-no-args.smir.json.expected b/tests/integration/expected/nightly-2025-03-01/closure-no-args.smir.json.expected similarity index 77% rename from tests/integration/programs/closure-no-args.smir.json.expected rename to tests/integration/expected/nightly-2025-03-01/closure-no-args.smir.json.expected index dacc8052..b6629f20 100644 --- a/tests/integration/programs/closure-no-args.smir.json.expected +++ b/tests/integration/expected/nightly-2025-03-01/closure-no-args.smir.json.expected @@ -125,8 +125,7 @@ ] } ] - }, - "span": 50 + } } ], "terminator": { @@ -142,10 +141,8 @@ { "Constant": { "const_": { - "id": 4, "kind": "ZeroSized" }, - "span": 32, "user_ty": null } } @@ -157,18 +154,15 @@ "func": { "Constant": { "const_": { - "id": 9, "kind": "ZeroSized" }, - "span": 50, "user_ty": null } }, "target": 1, "unwind": "Continue" } - }, - "span": 51 + } } }, { @@ -192,15 +186,13 @@ "otherwise": 3 } } - }, - "span": 52 + } } }, { "statements": [], "terminator": { - "kind": "Return", - "span": 53 + "kind": "Return" } }, { @@ -212,7 +204,6 @@ { "Constant": { "const_": { - "id": 11, "kind": { "Allocated": { "align": 8, @@ -246,7 +237,6 @@ } } }, - "span": 32, "user_ty": null } } @@ -258,44 +248,35 @@ "func": { "Constant": { "const_": { - "id": 10, "kind": "ZeroSized" }, - "span": 54, "user_ty": null } }, "target": null, "unwind": "Continue" } - }, - "span": 54 + } } } ], "locals": [ { - "mutability": "Mut", - "span": 55 + "mutability": "Mut" }, { - "mutability": "Not", - "span": 56 + "mutability": "Not" }, { - "mutability": "Mut", - "span": 51 + "mutability": "Mut" }, { - "mutability": "Mut", - "span": 50 + "mutability": "Mut" }, { - "mutability": "Mut", - "span": 54 + "mutability": "Mut" } ], - "span": 57, "spread_arg": null, "var_debug_info": [ { @@ -303,23 +284,19 @@ "composite": null, "name": "sum", "source_info": { - "scope": 1, - "span": 56 + "scope": 1 }, "value": { "Const": { "const_": { - "id": 12, "kind": "ZeroSized" }, - "span": 32, "user_ty": null } } } ] }, - "id": 6, "name": "main" } }, @@ -333,60 +310,196 @@ "arg_count": 1, "blocks": [ { - "statements": [], + "statements": [ + { + "kind": { + "Assign": [ + { + "local": 0, + "projection": [] + }, + { + "Use": { + "Constant": { + "const_": { + "kind": { + "Allocated": { + "align": 4, + "bytes": [ + 42, + 0, + 0, + 0 + ], + "mutability": "Mut", + "provenance": { + "ptrs": [] + } + } + } + }, + "user_ty": null + } + } + } + ] + } + } + ], "terminator": { - "kind": "Return", - "span": 44 + "kind": "Return" } } ], "locals": [ { - "mutability": "Mut", - "span": 44 + "mutability": "Mut" }, { - "mutability": "Not", - "span": 44 + "mutability": "Mut" } ], - "span": 44, "spread_arg": null, "var_debug_info": [] }, - "id": 4, - "name": "std::ptr::drop_in_place::<{closure@std::rt::lang_start<()>::{closure#0}}>" + "name": "main::{closure#0}" } }, - "symbol_name": "_ZN4core3ptr85drop_in_place$LT$std..rt..lang_start$LT$$LP$$RP$$GT$..$u7b$$u7b$closure$u7d$$u7d$$GT$17h" + "symbol_name": "_ZN15closure_no_args4main28_$u7b$$u7b$closure$u7d$$u7d$17h" }, { "details": null, "mono_item_kind": { "MonoItemFn": { "body": { - "arg_count": 1, + "arg_count": 4, "blocks": [ { - "statements": [], + "statements": [ + { + "kind": { + "StorageLive": 5 + } + }, + { + "kind": { + "StorageLive": 7 + } + }, + { + "kind": { + "Assign": [ + { + "local": 7, + "projection": [] + }, + { + "Aggregate": [ + { + "Closure": [ + 0, + [ + { + "Type": 0 + }, + { + "Type": 0 + }, + { + "Type": 0 + }, + { + "Type": 0 + } + ] + ] + }, + [ + { + "Copy": { + "local": 1, + "projection": [] + } + } + ] + ] + } + ] + } + }, + { + "kind": { + "Assign": [ + { + "local": 6, + "projection": [] + }, + { + "Ref": [ + { + "kind": "ReErased" + }, + "Shared", + { + "local": 7, + "projection": [] + } + ] + } + ] + } + }, + { + "kind": { + "Assign": [ + { + "local": 5, + "projection": [] + }, + { + "Cast": [ + { + "PointerCoercion": "Unsize" + }, + { + "Copy": { + "local": 6, + "projection": [] + } + }, + 0 + ] + } + ] + } + } + ], "terminator": { "kind": { "Call": { "args": [ { "Move": { - "local": 1, + "local": 5, "projection": [] } }, { - "Constant": { - "const_": { - "id": 4, - "kind": "ZeroSized" - }, - "span": 32, - "user_ty": null + "Move": { + "local": 2, + "projection": [] + } + }, + { + "Move": { + "local": 3, + "projection": [] + } + }, + { + "Move": { + "local": 4, + "projection": [] } } ], @@ -397,90 +510,69 @@ "func": { "Constant": { "const_": { - "id": 3, "kind": "ZeroSized" }, - "span": 31, "user_ty": null } }, "target": 1, "unwind": "Continue" } - }, - "span": 33 + } } }, { - "statements": [], - "terminator": { - "kind": { - "Call": { - "args": [ - { - "Constant": { - "const_": { - "id": 4, - "kind": "ZeroSized" - }, - "span": 32, - "user_ty": null - } - } - ], - "destination": { - "local": 2, - "projection": [] - }, - "func": { - "Constant": { - "const_": { - "id": 5, - "kind": "ZeroSized" - }, - "span": 34, - "user_ty": null - } - }, - "target": 2, - "unwind": "Unreachable" + "statements": [ + { + "kind": { + "StorageDead": 5 } }, - "span": 35 - } - }, - { - "statements": [], + { + "kind": { + "StorageDead": 7 + } + } + ], "terminator": { - "kind": "Return", - "span": 36 + "kind": "Return" } } ], "locals": [ { - "mutability": "Mut", - "span": 37 + "mutability": "Mut" + }, + { + "mutability": "Not" + }, + { + "mutability": "Not" + }, + { + "mutability": "Not" + }, + { + "mutability": "Not" + }, + { + "mutability": "Mut" }, { - "mutability": "Not", - "span": 38 + "mutability": "Not" }, { - "mutability": "Not", - "span": 39 + "mutability": "Not" } ], - "span": 42, "spread_arg": null, "var_debug_info": [ { "argument_index": 1, "composite": null, - "name": "f", + "name": "main", "source_info": { - "scope": 0, - "span": 38 + "scope": 0 }, "value": { "Place": { @@ -490,209 +582,53 @@ } }, { - "argument_index": null, + "argument_index": 2, "composite": null, - "name": "result", + "name": "argc", "source_info": { - "scope": 1, - "span": 40 + "scope": 0 }, "value": { "Place": { - "local": 0, + "local": 2, "projection": [] } } }, { - "argument_index": 1, + "argument_index": 3, "composite": null, - "name": "dummy", + "name": "argv", "source_info": { - "scope": 2, - "span": 41 + "scope": 0 }, "value": { - "Const": { - "const_": { - "id": 4, - "kind": "ZeroSized" - }, - "span": 32, - "user_ty": null + "Place": { + "local": 3, + "projection": [] + } + } + }, + { + "argument_index": 4, + "composite": null, + "name": "sigpipe", + "source_info": { + "scope": 0 + }, + "value": { + "Place": { + "local": 4, + "projection": [] } } } ] }, - "id": 2, - "name": "std::sys::backtrace::__rust_begin_short_backtrace::" + "name": "std::rt::lang_start::<()>" } }, - "symbol_name": "_ZN3std3sys9backtrace28__rust_begin_short_backtrace17h" - }, - { - "details": null, - "mono_item_kind": { - "MonoItemFn": { - "body": { - "arg_count": 1, - "blocks": [ - { - "statements": [ - { - "kind": { - "Assign": [ - { - "local": 0, - "projection": [] - }, - { - "Use": { - "Constant": { - "const_": { - "id": 8, - "kind": { - "Allocated": { - "align": 1, - "bytes": [ - 0 - ], - "mutability": "Mut", - "provenance": { - "ptrs": [] - } - } - } - }, - "span": 46, - "user_ty": null - } - } - } - ] - }, - "span": 46 - } - ], - "terminator": { - "kind": "Return", - "span": 45 - } - } - ], - "locals": [ - { - "mutability": "Mut", - "span": 47 - }, - { - "mutability": "Not", - "span": 48 - } - ], - "span": 49, - "spread_arg": null, - "var_debug_info": [ - { - "argument_index": 1, - "composite": null, - "name": "self", - "source_info": { - "scope": 0, - "span": 48 - }, - "value": { - "Const": { - "const_": { - "id": 4, - "kind": "ZeroSized" - }, - "span": 32, - "user_ty": null - } - } - } - ] - }, - "id": 5, - "name": "<() as std::process::Termination>::report" - } - }, - "symbol_name": "_ZN54_$LT$$LP$$RP$$u20$as$u20$std..process..Termination$GT$6report17h" - }, - { - "details": null, - "mono_item_kind": { - "MonoItemFn": { - "body": { - "arg_count": 1, - "blocks": [ - { - "statements": [ - { - "kind": { - "Assign": [ - { - "local": 0, - "projection": [] - }, - { - "Use": { - "Constant": { - "const_": { - "id": 13, - "kind": { - "Allocated": { - "align": 4, - "bytes": [ - 42, - 0, - 0, - 0 - ], - "mutability": "Mut", - "provenance": { - "ptrs": [] - } - } - } - }, - "span": 59, - "user_ty": null - } - } - } - ] - }, - "span": 59 - } - ], - "terminator": { - "kind": "Return", - "span": 58 - } - } - ], - "locals": [ - { - "mutability": "Mut", - "span": 60 - }, - { - "mutability": "Mut", - "span": 61 - } - ], - "span": 61, - "spread_arg": null, - "var_debug_info": [] - }, - "id": 7, - "name": "main::{closure#0}" - } - }, - "symbol_name": "_ZN15closure_no_args4main28_$u7b$$u7b$closure$u7d$$u7d$17h" + "symbol_name": "_ZN3std2rt10lang_start17h" }, { "details": null, @@ -706,20 +642,17 @@ { "kind": { "StorageLive": 2 - }, - "span": 16 + } }, { "kind": { "StorageLive": 3 - }, - "span": 15 + } }, { "kind": { "StorageLive": 4 - }, - "span": 17 + } }, { "kind": { @@ -737,7 +670,7 @@ { "Field": [ 0, - 7 + 0 ] } ] @@ -745,8 +678,7 @@ } } ] - }, - "span": 17 + } } ], "terminator": { @@ -767,18 +699,15 @@ "func": { "Constant": { "const_": { - "id": 1, "kind": "ZeroSized" }, - "span": 14, "user_ty": null } }, "target": 1, "unwind": "Continue" } - }, - "span": 15 + } } }, { @@ -786,8 +715,7 @@ { "kind": { "StorageDead": 4 - }, - "span": 19 + } } ], "terminator": { @@ -808,18 +736,15 @@ "func": { "Constant": { "const_": { - "id": 2, "kind": "ZeroSized" }, - "span": 18, "user_ty": null } }, "target": 2, "unwind": "Continue" } - }, - "span": 16 + } } }, { @@ -827,14 +752,12 @@ { "kind": { "StorageDead": 3 - }, - "span": 21 + } }, { "kind": { "StorageLive": 5 - }, - "span": 22 + } }, { "kind": { @@ -843,42 +766,6 @@ "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": { @@ -887,13 +774,13 @@ { "Field": [ 0, - 15 + 0 ] }, { "Field": [ 0, - 9 + 0 ] } ] @@ -901,8 +788,7 @@ } } ] - }, - "span": 23 + } }, { "kind": { @@ -916,73 +802,52 @@ "IntToInt", { "Move": { - "local": 6, + "local": 5, "projection": [] } }, - 16 + 0 ] } ] - }, - "span": 24 - }, - { - "kind": { - "StorageDead": 6 - }, - "span": 25 + } }, { "kind": { "StorageDead": 5 - }, - "span": 26 + } }, { "kind": { "StorageDead": 2 - }, - "span": 27 + } } ], "terminator": { - "kind": "Return", - "span": 20 + "kind": "Return" } } ], "locals": [ { - "mutability": "Mut", - "span": 28 - }, - { - "mutability": "Mut", - "span": 3 + "mutability": "Mut" }, { - "mutability": "Mut", - "span": 16 + "mutability": "Mut" }, { - "mutability": "Mut", - "span": 15 + "mutability": "Mut" }, { - "mutability": "Mut", - "span": 17 + "mutability": "Mut" }, { - "mutability": "Mut", - "span": 22 + "mutability": "Mut" }, { - "mutability": "Mut", - "span": 23 + "mutability": "Mut" } ], - "span": 3, "spread_arg": null, "var_debug_info": [ { @@ -990,8 +855,7 @@ "composite": null, "name": "main", "source_info": { - "scope": 0, - "span": 9 + "scope": 0 }, "value": { "Place": { @@ -1001,7 +865,7 @@ { "Field": [ 0, - 7 + 0 ] } ] @@ -1013,8 +877,7 @@ "composite": null, "name": "self", "source_info": { - "scope": 1, - "span": 29 + "scope": 1 }, "value": { "Place": { @@ -1022,25 +885,9 @@ "projection": [] } } - }, - { - "argument_index": 1, - "composite": null, - "name": "self", - "source_info": { - "scope": 2, - "span": 30 - }, - "value": { - "Place": { - "local": 5, - "projection": [] - } - } } ] }, - "id": 1, "name": "std::rt::lang_start::<()>::{closure#0}" } }, @@ -1051,62 +898,150 @@ "mono_item_kind": { "MonoItemFn": { "body": { - "arg_count": 2, + "arg_count": 1, "blocks": [ { "statements": [], "terminator": { "kind": { "Call": { - "args": [], + "args": [ + { + "Move": { + "local": 1, + "projection": [] + } + }, + { + "Constant": { + "const_": { + "kind": "ZeroSized" + }, + "user_ty": null + } + } + ], "destination": { "local": 0, "projection": [] }, "func": { - "Move": { - "local": 1, - "projection": [] + "Constant": { + "const_": { + "kind": "ZeroSized" + }, + "user_ty": null } }, "target": 1, "unwind": "Continue" } - }, - "span": 43 + } } }, { "statements": [], "terminator": { - "kind": "Return", - "span": 43 - } - } - ], - "locals": [ - { - "mutability": "Mut", - "span": 43 - }, - { - "mutability": "Not", - "span": 43 - }, - { - "mutability": "Not", - "span": 43 - } - ], - "span": 43, - "spread_arg": 2, - "var_debug_info": [] + "kind": { + "Call": { + "args": [ + { + "Constant": { + "const_": { + "kind": "ZeroSized" + }, + "user_ty": null + } + } + ], + "destination": { + "local": 2, + "projection": [] + }, + "func": { + "Constant": { + "const_": { + "kind": "ZeroSized" + }, + "user_ty": null + } + }, + "target": 2, + "unwind": "Unreachable" + } + } + } + }, + { + "statements": [], + "terminator": { + "kind": "Return" + } + } + ], + "locals": [ + { + "mutability": "Mut" + }, + { + "mutability": "Not" + }, + { + "mutability": "Not" + } + ], + "spread_arg": null, + "var_debug_info": [ + { + "argument_index": 1, + "composite": null, + "name": "f", + "source_info": { + "scope": 0 + }, + "value": { + "Place": { + "local": 1, + "projection": [] + } + } + }, + { + "argument_index": null, + "composite": null, + "name": "result", + "source_info": { + "scope": 1 + }, + "value": { + "Place": { + "local": 0, + "projection": [] + } + } + }, + { + "argument_index": 1, + "composite": null, + "name": "dummy", + "source_info": { + "scope": 2 + }, + "value": { + "Const": { + "const_": { + "kind": "ZeroSized" + }, + "user_ty": null + } + } + } + ] }, - "id": 3, - "name": ">::call_once" + "name": "std::sys::backtrace::__rust_begin_short_backtrace::" } }, - "symbol_name": "_ZN4core3ops8function6FnOnce9call_once17h" + "symbol_name": "_ZN3std3sys9backtrace28__rust_begin_short_backtrace17h" }, { "details": null, @@ -1143,52 +1078,98 @@ "func": { "Constant": { "const_": { - "id": 6, "kind": "ZeroSized" }, - "span": 43, "user_ty": null } }, "target": 1, "unwind": "Continue" } - }, - "span": 43 + } } }, { "statements": [], "terminator": { - "kind": "Return", - "span": 43 + "kind": "Return" } } ], "locals": [ { - "mutability": "Mut", - "span": 43 + "mutability": "Mut" }, { - "mutability": "Not", - "span": 43 + "mutability": "Not" }, { - "mutability": "Not", - "span": 43 + "mutability": "Not" } ], - "span": 43, "spread_arg": 2, "var_debug_info": [] }, - "id": 3, "name": "<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once" } }, "symbol_name": "_ZN4core3ops8function6FnOnce40call_once$u7b$$u7b$vtable.shim$u7d$$u7d$17h" }, + { + "details": null, + "mono_item_kind": { + "MonoItemFn": { + "body": { + "arg_count": 2, + "blocks": [ + { + "statements": [], + "terminator": { + "kind": { + "Call": { + "args": [], + "destination": { + "local": 0, + "projection": [] + }, + "func": { + "Move": { + "local": 1, + "projection": [] + } + }, + "target": 1, + "unwind": "Continue" + } + } + } + }, + { + "statements": [], + "terminator": { + "kind": "Return" + } + } + ], + "locals": [ + { + "mutability": "Mut" + }, + { + "mutability": "Not" + }, + { + "mutability": "Not" + } + ], + "spread_arg": 2, + "var_debug_info": [] + }, + "name": ">::call_once" + } + }, + "symbol_name": "_ZN4core3ops8function6FnOnce9call_once17h" + }, { "details": null, "mono_item_kind": { @@ -1222,8 +1203,7 @@ ] } ] - }, - "span": 43 + } } ], "terminator": { @@ -1250,10 +1230,8 @@ "func": { "Constant": { "const_": { - "id": 7, "kind": "ZeroSized" }, - "span": 43, "user_ty": null } }, @@ -1262,8 +1240,7 @@ "Cleanup": 3 } } - }, - "span": 43 + } } }, { @@ -1278,15 +1255,13 @@ "target": 2, "unwind": "Continue" } - }, - "span": 43 + } } }, { "statements": [], "terminator": { - "kind": "Return", - "span": 43 + "kind": "Return" } }, { @@ -1301,222 +1276,77 @@ "target": 4, "unwind": "Terminate" } - }, - "span": 43 - } - }, - { - "statements": [], - "terminator": { - "kind": "Resume", - "span": 43 - } - } - ], - "locals": [ - { - "mutability": "Mut", - "span": 43 - }, - { - "mutability": "Not", - "span": 43 - }, - { - "mutability": "Not", - "span": 43 - }, - { - "mutability": "Not", - "span": 43 - } - ], - "span": 43, - "spread_arg": 2, - "var_debug_info": [] - }, - "id": 3, - "name": "<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once" - } - }, - "symbol_name": "_ZN4core3ops8function6FnOnce9call_once17h" - }, - { - "details": null, - "mono_item_kind": { - "MonoItemFn": { - "body": { - "arg_count": 4, - "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": { - "args": [ - { - "Move": { - "local": 6, - "projection": [] - } - }, - { - "Move": { - "local": 2, - "projection": [] - } - }, - { - "Move": { - "local": 3, - "projection": [] - } - }, - { - "Move": { - "local": 4, - "projection": [] - } - } - ], - "destination": { - "local": 5, - "projection": [] - }, - "func": { - "Constant": { - "const_": { - "id": 0, - "kind": "ZeroSized" - }, - "span": 0, - "user_ty": null - } - }, - "target": 1, - "unwind": "Continue" - } - }, - "span": 1 } }, + { + "statements": [], + "terminator": { + "kind": "Resume" + } + } + ], + "locals": [ + { + "mutability": "Mut" + }, + { + "mutability": "Not" + }, + { + "mutability": "Not" + }, + { + "mutability": "Not" + } + ], + "spread_arg": 2, + "var_debug_info": [] + }, + "name": "<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once" + } + }, + "symbol_name": "_ZN4core3ops8function6FnOnce9call_once17h" + }, + { + "details": null, + "mono_item_kind": { + "MonoItemFn": { + "body": { + "arg_count": 1, + "blocks": [ + { + "statements": [], + "terminator": { + "kind": "Return" + } + } + ], + "locals": [ + { + "mutability": "Mut" + }, + { + "mutability": "Not" + } + ], + "spread_arg": null, + "var_debug_info": [] + }, + "name": "std::ptr::drop_in_place::<{closure@std::rt::lang_start<()>::{closure#0}}>" + } + }, + "symbol_name": "_ZN4core3ptr85drop_in_place$LT$std..rt..lang_start$LT$$LP$$RP$$GT$..$u7b$$u7b$closure$u7d$$u7d$$GT$17h" + }, + { + "details": null, + "mono_item_kind": { + "MonoItemFn": { + "body": { + "arg_count": 1, + "blocks": [ { "statements": [ - { - "kind": { - "StorageDead": 6 - }, - "span": 5 - }, { "kind": { "Assign": [ @@ -1526,168 +1356,49 @@ }, { "Use": { - "Copy": { - "local": 5, - "projection": [ - { - "Downcast": 0 - }, - { - "Field": [ - 0, - 6 - ] + "Constant": { + "const_": { + "kind": { + "Allocated": { + "align": 1, + "bytes": [ + 0 + ], + "mutability": "Mut", + "provenance": { + "ptrs": [] + } + } } - ] + }, + "user_ty": null } } } ] - }, - "span": 6 - }, - { - "kind": { - "StorageDead": 8 - }, - "span": 7 - }, - { - "kind": { - "StorageDead": 5 - }, - "span": 7 + } } ], "terminator": { - "kind": "Return", - "span": 4 + "kind": "Return" } } ], "locals": [ { - "mutability": "Mut", - "span": 8 - }, - { - "mutability": "Not", - "span": 9 - }, - { - "mutability": "Not", - "span": 10 - }, - { - "mutability": "Not", - "span": 11 - }, - { - "mutability": "Not", - "span": 12 - }, - { - "mutability": "Mut", - "span": 1 - }, - { - "mutability": "Mut", - "span": 2 - }, - { - "mutability": "Not", - "span": 2 + "mutability": "Mut" }, { - "mutability": "Not", - "span": 3 + "mutability": "Not" } ], - "span": 13, "spread_arg": null, - "var_debug_info": [ - { - "argument_index": 1, - "composite": null, - "name": "main", - "source_info": { - "scope": 0, - "span": 9 - }, - "value": { - "Place": { - "local": 1, - "projection": [] - } - } - }, - { - "argument_index": 2, - "composite": null, - "name": "argc", - "source_info": { - "scope": 0, - "span": 10 - }, - "value": { - "Place": { - "local": 2, - "projection": [] - } - } - }, - { - "argument_index": 3, - "composite": null, - "name": "argv", - "source_info": { - "scope": 0, - "span": 11 - }, - "value": { - "Place": { - "local": 3, - "projection": [] - } - } - }, - { - "argument_index": 4, - "composite": null, - "name": "sigpipe", - "source_info": { - "scope": 0, - "span": 12 - }, - "value": { - "Place": { - "local": 4, - "projection": [] - } - } - }, - { - "argument_index": null, - "composite": null, - "name": "v", - "source_info": { - "scope": 1, - "span": 6 - }, - "value": { - "Place": { - "local": 0, - "projection": [] - } - } - } - ] + "var_debug_info": [] }, - "id": 0, - "name": "std::rt::lang_start::<()>" + "name": "<() as std::process::Termination>::report" } }, - "symbol_name": "_ZN3std2rt10lang_start17h" + "symbol_name": "_ZN54_$LT$$LP$$RP$$u20$as$u20$std..process..Termination$GT$6report17h" } ], "types": [ @@ -1724,54 +1435,6 @@ } } ], - [ - { - "EnumType": { - "discriminants": [ - 0, - 1 - ], - "fields": "elided", - "layout": { - "abi": { - "Scalar": { - "Initialized": { - "valid_range": { - "end": 18446744073709551615, - "start": 0 - }, - "value": { - "Int": { - "length": "I64", - "signed": true - } - } - } - } - }, - "abi_align": 8, - "fields": { - "Arbitrary": { - "offsets": [ - { - "num_bits": 0 - } - ] - } - }, - "size": { - "num_bits": 64 - }, - "variants": { - "Single": { - "index": 0 - } - } - }, - "name": "std::result::Result" - } - } - ], [ { "StructType": { @@ -2158,39 +1821,6 @@ } } ], - [ - { - "RefType": { - "layout": { - "abi": { - "Scalar": { - "Initialized": { - "valid_range": { - "end": 18446744073709551615, - "start": 1 - }, - "value": { - "Pointer": 0 - } - } - } - }, - "abi_align": 8, - "fields": "Primitive", - "size": { - "num_bits": 64 - }, - "variants": { - "Single": { - "index": 0 - } - } - }, - "mutability": "Not", - "pointee_type": "elided" - } - } - ], [ { "RefType": { diff --git a/tests/integration/programs/const-arithm-simple.smir.json.expected b/tests/integration/expected/nightly-2025-03-01/const-arithm-simple.smir.json.expected similarity index 78% rename from tests/integration/programs/const-arithm-simple.smir.json.expected rename to tests/integration/expected/nightly-2025-03-01/const-arithm-simple.smir.json.expected index 24dac3cf..6a48df54 100644 --- a/tests/integration/programs/const-arithm-simple.smir.json.expected +++ b/tests/integration/expected/nightly-2025-03-01/const-arithm-simple.smir.json.expected @@ -106,7 +106,6 @@ "Use": { "Constant": { "const_": { - "id": 10, "kind": { "Allocated": { "align": 8, @@ -127,14 +126,12 @@ } } }, - "span": 58, "user_ty": null } } } ] - }, - "span": 59 + } }, { "kind": { @@ -147,7 +144,6 @@ "Use": { "Constant": { "const_": { - "id": 11, "kind": { "Allocated": { "align": 8, @@ -168,14 +164,12 @@ } } }, - "span": 60, "user_ty": null } } } ] - }, - "span": 61 + } } ], "terminator": { @@ -202,18 +196,15 @@ "func": { "Constant": { "const_": { - "id": 9, "kind": "ZeroSized" }, - "span": 56, "user_ty": null } }, "target": 1, "unwind": "Continue" } - }, - "span": 57 + } } }, { @@ -237,8 +228,7 @@ "otherwise": 3 } } - }, - "span": 62 + } } }, { @@ -250,7 +240,6 @@ { "Constant": { "const_": { - "id": 13, "kind": { "Allocated": { "align": 8, @@ -284,7 +273,6 @@ } } }, - "span": 32, "user_ty": null } } @@ -296,51 +284,41 @@ "func": { "Constant": { "const_": { - "id": 12, "kind": "ZeroSized" }, - "span": 63, "user_ty": null } }, "target": null, "unwind": "Continue" } - }, - "span": 63 + } } }, { "statements": [], "terminator": { - "kind": "Return", - "span": 64 + "kind": "Return" } } ], "locals": [ { - "mutability": "Mut", - "span": 65 + "mutability": "Mut" }, { - "mutability": "Not", - "span": 66 + "mutability": "Not" }, { - "mutability": "Mut", - "span": 59 + "mutability": "Mut" }, { - "mutability": "Mut", - "span": 61 + "mutability": "Mut" }, { - "mutability": "Mut", - "span": 63 + "mutability": "Mut" } ], - "span": 69, "spread_arg": null, "var_debug_info": [ { @@ -348,13 +326,11 @@ "composite": null, "name": "x", "source_info": { - "scope": 1, - "span": 67 + "scope": 1 }, "value": { "Const": { "const_": { - "id": 10, "kind": { "Allocated": { "align": 8, @@ -375,7 +351,6 @@ } } }, - "span": 58, "user_ty": null } } @@ -385,13 +360,11 @@ "composite": null, "name": "y", "source_info": { - "scope": 2, - "span": 68 + "scope": 2 }, "value": { "Const": { "const_": { - "id": 11, "kind": { "Allocated": { "align": 8, @@ -412,7 +385,6 @@ } } }, - "span": 60, "user_ty": null } } @@ -422,8 +394,7 @@ "composite": null, "name": "z", "source_info": { - "scope": 3, - "span": 66 + "scope": 3 }, "value": { "Place": { @@ -434,7 +405,6 @@ } ] }, - "id": 7, "name": "main" } }, @@ -445,63 +415,224 @@ "mono_item_kind": { "MonoItemFn": { "body": { - "arg_count": 1, + "arg_count": 2, "blocks": [ { - "statements": [], + "statements": [ + { + "kind": { + "Assign": [ + { + "local": 0, + "projection": [] + }, + { + "BinaryOp": [ + "Gt", + { + "Copy": { + "local": 1, + "projection": [] + } + }, + { + "Copy": { + "local": 2, + "projection": [] + } + } + ] + } + ] + } + } + ], "terminator": { - "kind": "Return", - "span": 44 + "kind": "Return" } } ], "locals": [ { - "mutability": "Mut", - "span": 44 + "mutability": "Mut" + }, + { + "mutability": "Not" }, { - "mutability": "Not", - "span": 44 + "mutability": "Not" } ], - "span": 44, "spread_arg": null, - "var_debug_info": [] + "var_debug_info": [ + { + "argument_index": 1, + "composite": null, + "name": "x", + "source_info": { + "scope": 0 + }, + "value": { + "Place": { + "local": 1, + "projection": [] + } + } + }, + { + "argument_index": 2, + "composite": null, + "name": "y", + "source_info": { + "scope": 0 + }, + "value": { + "Place": { + "local": 2, + "projection": [] + } + } + } + ] }, - "id": 4, - "name": "std::ptr::drop_in_place::<{closure@std::rt::lang_start<()>::{closure#0}}>" + "name": "test" } }, - "symbol_name": "_ZN4core3ptr85drop_in_place$LT$std..rt..lang_start$LT$$LP$$RP$$GT$..$u7b$$u7b$closure$u7d$$u7d$$GT$17h" + "symbol_name": "_ZN19const_arithm_simple4test17h" }, { "details": null, "mono_item_kind": { "MonoItemFn": { "body": { - "arg_count": 1, + "arg_count": 4, "blocks": [ { - "statements": [], + "statements": [ + { + "kind": { + "StorageLive": 5 + } + }, + { + "kind": { + "StorageLive": 7 + } + }, + { + "kind": { + "Assign": [ + { + "local": 7, + "projection": [] + }, + { + "Aggregate": [ + { + "Closure": [ + 0, + [ + { + "Type": 0 + }, + { + "Type": 0 + }, + { + "Type": 0 + }, + { + "Type": 0 + } + ] + ] + }, + [ + { + "Copy": { + "local": 1, + "projection": [] + } + } + ] + ] + } + ] + } + }, + { + "kind": { + "Assign": [ + { + "local": 6, + "projection": [] + }, + { + "Ref": [ + { + "kind": "ReErased" + }, + "Shared", + { + "local": 7, + "projection": [] + } + ] + } + ] + } + }, + { + "kind": { + "Assign": [ + { + "local": 5, + "projection": [] + }, + { + "Cast": [ + { + "PointerCoercion": "Unsize" + }, + { + "Copy": { + "local": 6, + "projection": [] + } + }, + 0 + ] + } + ] + } + } + ], "terminator": { "kind": { "Call": { "args": [ { "Move": { - "local": 1, + "local": 5, "projection": [] } }, { - "Constant": { - "const_": { - "id": 4, - "kind": "ZeroSized" - }, - "span": 32, - "user_ty": null + "Move": { + "local": 2, + "projection": [] + } + }, + { + "Move": { + "local": 3, + "projection": [] + } + }, + { + "Move": { + "local": 4, + "projection": [] } } ], @@ -512,90 +643,69 @@ "func": { "Constant": { "const_": { - "id": 3, "kind": "ZeroSized" }, - "span": 31, "user_ty": null } }, "target": 1, "unwind": "Continue" } - }, - "span": 33 + } } }, { - "statements": [], - "terminator": { - "kind": { - "Call": { - "args": [ - { - "Constant": { - "const_": { - "id": 4, - "kind": "ZeroSized" - }, - "span": 32, - "user_ty": null - } - } - ], - "destination": { - "local": 2, - "projection": [] - }, - "func": { - "Constant": { - "const_": { - "id": 5, - "kind": "ZeroSized" - }, - "span": 34, - "user_ty": null - } - }, - "target": 2, - "unwind": "Unreachable" + "statements": [ + { + "kind": { + "StorageDead": 5 } }, - "span": 35 - } - }, - { - "statements": [], + { + "kind": { + "StorageDead": 7 + } + } + ], "terminator": { - "kind": "Return", - "span": 36 + "kind": "Return" } } ], "locals": [ { - "mutability": "Mut", - "span": 37 + "mutability": "Mut" + }, + { + "mutability": "Not" + }, + { + "mutability": "Not" }, { - "mutability": "Not", - "span": 38 + "mutability": "Not" }, { - "mutability": "Not", - "span": 39 + "mutability": "Not" + }, + { + "mutability": "Mut" + }, + { + "mutability": "Not" + }, + { + "mutability": "Not" } ], - "span": 42, "spread_arg": null, "var_debug_info": [ { "argument_index": 1, "composite": null, - "name": "f", + "name": "main", "source_info": { - "scope": 0, - "span": 38 + "scope": 0 }, "value": { "Place": { @@ -605,136 +715,53 @@ } }, { - "argument_index": null, + "argument_index": 2, "composite": null, - "name": "result", + "name": "argc", "source_info": { - "scope": 1, - "span": 40 + "scope": 0 }, "value": { "Place": { - "local": 0, + "local": 2, "projection": [] } } }, { - "argument_index": 1, + "argument_index": 3, "composite": null, - "name": "dummy", + "name": "argv", "source_info": { - "scope": 2, - "span": 41 + "scope": 0 }, "value": { - "Const": { - "const_": { - "id": 4, - "kind": "ZeroSized" - }, - "span": 32, - "user_ty": null - } - } - } - ] - }, - "id": 2, - "name": "std::sys::backtrace::__rust_begin_short_backtrace::" - } - }, - "symbol_name": "_ZN3std3sys9backtrace28__rust_begin_short_backtrace17h" - }, - { - "details": null, - "mono_item_kind": { - "MonoItemFn": { - "body": { - "arg_count": 1, - "blocks": [ - { - "statements": [ - { - "kind": { - "Assign": [ - { - "local": 0, - "projection": [] - }, - { - "Use": { - "Constant": { - "const_": { - "id": 8, - "kind": { - "Allocated": { - "align": 1, - "bytes": [ - 0 - ], - "mutability": "Mut", - "provenance": { - "ptrs": [] - } - } - } - }, - "span": 46, - "user_ty": null - } - } - } - ] - }, - "span": 46 + "Place": { + "local": 3, + "projection": [] } - ], - "terminator": { - "kind": "Return", - "span": 45 } - } - ], - "locals": [ - { - "mutability": "Mut", - "span": 47 }, { - "mutability": "Not", - "span": 48 - } - ], - "span": 49, - "spread_arg": null, - "var_debug_info": [ - { - "argument_index": 1, + "argument_index": 4, "composite": null, - "name": "self", + "name": "sigpipe", "source_info": { - "scope": 0, - "span": 48 + "scope": 0 }, "value": { - "Const": { - "const_": { - "id": 4, - "kind": "ZeroSized" - }, - "span": 32, - "user_ty": null + "Place": { + "local": 4, + "projection": [] } } } ] }, - "id": 5, - "name": "<() as std::process::Termination>::report" + "name": "std::rt::lang_start::<()>" } }, - "symbol_name": "_ZN54_$LT$$LP$$RP$$u20$as$u20$std..process..Termination$GT$6report17h" + "symbol_name": "_ZN3std2rt10lang_start17h" }, { "details": null, @@ -748,20 +775,17 @@ { "kind": { "StorageLive": 2 - }, - "span": 16 + } }, { "kind": { "StorageLive": 3 - }, - "span": 15 + } }, { "kind": { "StorageLive": 4 - }, - "span": 17 + } }, { "kind": { @@ -779,7 +803,7 @@ { "Field": [ 0, - 7 + 0 ] } ] @@ -787,8 +811,7 @@ } } ] - }, - "span": 17 + } } ], "terminator": { @@ -809,18 +832,15 @@ "func": { "Constant": { "const_": { - "id": 1, "kind": "ZeroSized" }, - "span": 14, "user_ty": null } }, "target": 1, "unwind": "Continue" } - }, - "span": 15 + } } }, { @@ -828,8 +848,7 @@ { "kind": { "StorageDead": 4 - }, - "span": 19 + } } ], "terminator": { @@ -850,18 +869,15 @@ "func": { "Constant": { "const_": { - "id": 2, "kind": "ZeroSized" }, - "span": 18, "user_ty": null } }, "target": 2, "unwind": "Continue" } - }, - "span": 16 + } } }, { @@ -869,14 +885,12 @@ { "kind": { "StorageDead": 3 - }, - "span": 21 + } }, { "kind": { "StorageLive": 5 - }, - "span": 22 + } }, { "kind": { @@ -885,42 +899,6 @@ "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": { @@ -929,13 +907,13 @@ { "Field": [ 0, - 15 + 0 ] }, { "Field": [ 0, - 9 + 0 ] } ] @@ -943,8 +921,7 @@ } } ] - }, - "span": 23 + } }, { "kind": { @@ -958,73 +935,52 @@ "IntToInt", { "Move": { - "local": 6, + "local": 5, "projection": [] } }, - 16 + 0 ] } ] - }, - "span": 24 - }, - { - "kind": { - "StorageDead": 6 - }, - "span": 25 + } }, { "kind": { "StorageDead": 5 - }, - "span": 26 + } }, { "kind": { "StorageDead": 2 - }, - "span": 27 + } } ], "terminator": { - "kind": "Return", - "span": 20 + "kind": "Return" } } ], "locals": [ { - "mutability": "Mut", - "span": 28 - }, - { - "mutability": "Mut", - "span": 3 + "mutability": "Mut" }, { - "mutability": "Mut", - "span": 16 + "mutability": "Mut" }, { - "mutability": "Mut", - "span": 15 + "mutability": "Mut" }, { - "mutability": "Mut", - "span": 17 + "mutability": "Mut" }, { - "mutability": "Mut", - "span": 22 + "mutability": "Mut" }, { - "mutability": "Mut", - "span": 23 + "mutability": "Mut" } ], - "span": 3, "spread_arg": null, "var_debug_info": [ { @@ -1032,8 +988,7 @@ "composite": null, "name": "main", "source_info": { - "scope": 0, - "span": 9 + "scope": 0 }, "value": { "Place": { @@ -1043,7 +998,7 @@ { "Field": [ 0, - 7 + 0 ] } ] @@ -1055,8 +1010,7 @@ "composite": null, "name": "self", "source_info": { - "scope": 1, - "span": 29 + "scope": 1 }, "value": { "Place": { @@ -1064,25 +1018,9 @@ "projection": [] } } - }, - { - "argument_index": 1, - "composite": null, - "name": "self", - "source_info": { - "scope": 2, - "span": 30 - }, - "value": { - "Place": { - "local": 5, - "projection": [] - } - } } ] }, - "id": 1, "name": "std::rt::lang_start::<()>::{closure#0}" } }, @@ -1093,70 +1031,47 @@ "mono_item_kind": { "MonoItemFn": { "body": { - "arg_count": 2, + "arg_count": 1, "blocks": [ { "statements": [], "terminator": { "kind": { "Call": { - "args": [], + "args": [ + { + "Move": { + "local": 1, + "projection": [] + } + }, + { + "Constant": { + "const_": { + "kind": "ZeroSized" + }, + "user_ty": null + } + } + ], "destination": { "local": 0, "projection": [] }, "func": { - "Move": { - "local": 1, - "projection": [] + "Constant": { + "const_": { + "kind": "ZeroSized" + }, + "user_ty": null } }, "target": 1, "unwind": "Continue" } - }, - "span": 43 - } - }, - { - "statements": [], - "terminator": { - "kind": "Return", - "span": 43 + } } - } - ], - "locals": [ - { - "mutability": "Mut", - "span": 43 - }, - { - "mutability": "Not", - "span": 43 }, - { - "mutability": "Not", - "span": 43 - } - ], - "span": 43, - "spread_arg": 2, - "var_debug_info": [] - }, - "id": 3, - "name": ">::call_once" - } - }, - "symbol_name": "_ZN4core3ops8function6FnOnce9call_once17h" - }, - { - "details": null, - "mono_item_kind": { - "MonoItemFn": { - "body": { - "arg_count": 2, - "blocks": [ { "statements": [], "terminator": { @@ -1164,141 +1079,58 @@ "Call": { "args": [ { - "Move": { - "local": 1, - "projection": [ - "Deref" - ] - } - }, - { - "Move": { - "local": 2, - "projection": [] + "Constant": { + "const_": { + "kind": "ZeroSized" + }, + "user_ty": null } } ], "destination": { - "local": 0, + "local": 2, "projection": [] }, "func": { "Constant": { "const_": { - "id": 6, "kind": "ZeroSized" }, - "span": 43, "user_ty": null } }, - "target": 1, - "unwind": "Continue" + "target": 2, + "unwind": "Unreachable" } - }, - "span": 43 + } } }, { "statements": [], "terminator": { - "kind": "Return", - "span": 43 + "kind": "Return" } } ], "locals": [ { - "mutability": "Mut", - "span": 43 + "mutability": "Mut" }, { - "mutability": "Not", - "span": 43 + "mutability": "Not" }, { - "mutability": "Not", - "span": 43 + "mutability": "Not" } ], - "span": 43, - "spread_arg": 2, - "var_debug_info": [] - }, - "id": 3, - "name": "<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once" - } - }, - "symbol_name": "_ZN4core3ops8function6FnOnce40call_once$u7b$$u7b$vtable.shim$u7d$$u7d$17h" - }, - { - "details": null, - "mono_item_kind": { - "MonoItemFn": { - "body": { - "arg_count": 2, - "blocks": [ - { - "statements": [ - { - "kind": { - "Assign": [ - { - "local": 0, - "projection": [] - }, - { - "BinaryOp": [ - "Gt", - { - "Copy": { - "local": 1, - "projection": [] - } - }, - { - "Copy": { - "local": 2, - "projection": [] - } - } - ] - } - ] - }, - "span": 51 - } - ], - "terminator": { - "kind": "Return", - "span": 50 - } - } - ], - "locals": [ - { - "mutability": "Mut", - "span": 52 - }, - { - "mutability": "Not", - "span": 53 - }, - { - "mutability": "Not", - "span": 54 - } - ], - "span": 55, "spread_arg": null, "var_debug_info": [ { "argument_index": 1, "composite": null, - "name": "x", + "name": "f", "source_info": { - "scope": 0, - "span": 53 + "scope": 0 }, "value": { "Place": { @@ -1308,27 +1140,41 @@ } }, { - "argument_index": 2, + "argument_index": null, "composite": null, - "name": "y", + "name": "result", "source_info": { - "scope": 0, - "span": 54 + "scope": 1 }, "value": { "Place": { - "local": 2, + "local": 0, "projection": [] } } + }, + { + "argument_index": 1, + "composite": null, + "name": "dummy", + "source_info": { + "scope": 2 + }, + "value": { + "Const": { + "const_": { + "kind": "ZeroSized" + }, + "user_ty": null + } + } } ] }, - "id": 6, - "name": "test" + "name": "std::sys::backtrace::__rust_begin_short_backtrace::" } }, - "symbol_name": "_ZN19const_arithm_simple4test17h" + "symbol_name": "_ZN3std3sys9backtrace28__rust_begin_short_backtrace17h" }, { "details": null, @@ -1338,43 +1184,17 @@ "arg_count": 2, "blocks": [ { - "statements": [ - { - "kind": { - "Assign": [ - { - "local": 3, - "projection": [] - }, - { - "Ref": [ - { - "kind": "ReErased" - }, - { - "Mut": { - "kind": "Default" - } - }, - { - "local": 1, - "projection": [] - } - ] - } - ] - }, - "span": 43 - } - ], + "statements": [], "terminator": { "kind": { "Call": { "args": [ { "Move": { - "local": 3, - "projection": [] + "local": 1, + "projection": [ + "Deref" + ] } }, { @@ -1391,93 +1211,94 @@ "func": { "Constant": { "const_": { - "id": 7, "kind": "ZeroSized" }, - "span": 43, "user_ty": null } }, "target": 1, - "unwind": { - "Cleanup": 3 - } + "unwind": "Continue" } - }, - "span": 43 + } } }, { "statements": [], "terminator": { - "kind": { - "Drop": { - "place": { - "local": 1, - "projection": [] - }, - "target": 2, - "unwind": "Continue" - } - }, - "span": 43 + "kind": "Return" } + } + ], + "locals": [ + { + "mutability": "Mut" }, { - "statements": [], - "terminator": { - "kind": "Return", - "span": 43 - } + "mutability": "Not" }, + { + "mutability": "Not" + } + ], + "spread_arg": 2, + "var_debug_info": [] + }, + "name": "<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once" + } + }, + "symbol_name": "_ZN4core3ops8function6FnOnce40call_once$u7b$$u7b$vtable.shim$u7d$$u7d$17h" + }, + { + "details": null, + "mono_item_kind": { + "MonoItemFn": { + "body": { + "arg_count": 2, + "blocks": [ { "statements": [], "terminator": { "kind": { - "Drop": { - "place": { - "local": 1, + "Call": { + "args": [], + "destination": { + "local": 0, "projection": [] }, - "target": 4, - "unwind": "Terminate" + "func": { + "Move": { + "local": 1, + "projection": [] + } + }, + "target": 1, + "unwind": "Continue" } - }, - "span": 43 + } } }, { "statements": [], "terminator": { - "kind": "Resume", - "span": 43 + "kind": "Return" } } ], "locals": [ { - "mutability": "Mut", - "span": 43 - }, - { - "mutability": "Not", - "span": 43 + "mutability": "Mut" }, { - "mutability": "Not", - "span": 43 + "mutability": "Not" }, { - "mutability": "Not", - "span": 43 + "mutability": "Not" } ], - "span": 43, "spread_arg": 2, "var_debug_info": [] }, - "id": 3, - "name": "<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once" + "name": ">::call_once" } }, "symbol_name": "_ZN4core3ops8function6FnOnce9call_once17h" @@ -1487,75 +1308,15 @@ "mono_item_kind": { "MonoItemFn": { "body": { - "arg_count": 4, + "arg_count": 2, "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, + "local": 3, "projection": [] }, { @@ -1563,59 +1324,25 @@ { "kind": "ReErased" }, - "Shared", - { - "local": 8, - "projection": [] - } - ] - } - ] - }, - "span": 2 - }, - { - "kind": { - "Assign": [ - { - "local": 6, - "projection": [] - }, - { - "Cast": [ - { - "PointerCoercion": "Unsize" - }, { - "Copy": { - "local": 7, - "projection": [] + "Mut": { + "kind": "Default" } }, - 5 + { + "local": 1, + "projection": [] + } ] } ] - }, - "span": 2 + } } ], "terminator": { "kind": { "Call": { "args": [ - { - "Move": { - "local": 6, - "projection": [] - } - }, - { - "Move": { - "local": 2, - "projection": [] - } - }, { "Move": { "local": 3, @@ -1624,40 +1351,135 @@ }, { "Move": { - "local": 4, + "local": 2, "projection": [] } } ], "destination": { - "local": 5, + "local": 0, "projection": [] }, "func": { "Constant": { "const_": { - "id": 0, "kind": "ZeroSized" }, - "span": 0, "user_ty": null } }, "target": 1, + "unwind": { + "Cleanup": 3 + } + } + } + } + }, + { + "statements": [], + "terminator": { + "kind": { + "Drop": { + "place": { + "local": 1, + "projection": [] + }, + "target": 2, "unwind": "Continue" } - }, - "span": 1 + } + } + }, + { + "statements": [], + "terminator": { + "kind": "Return" + } + }, + { + "statements": [], + "terminator": { + "kind": { + "Drop": { + "place": { + "local": 1, + "projection": [] + }, + "target": 4, + "unwind": "Terminate" + } + } } }, + { + "statements": [], + "terminator": { + "kind": "Resume" + } + } + ], + "locals": [ + { + "mutability": "Mut" + }, + { + "mutability": "Not" + }, + { + "mutability": "Not" + }, + { + "mutability": "Not" + } + ], + "spread_arg": 2, + "var_debug_info": [] + }, + "name": "<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once" + } + }, + "symbol_name": "_ZN4core3ops8function6FnOnce9call_once17h" + }, + { + "details": null, + "mono_item_kind": { + "MonoItemFn": { + "body": { + "arg_count": 1, + "blocks": [ + { + "statements": [], + "terminator": { + "kind": "Return" + } + } + ], + "locals": [ + { + "mutability": "Mut" + }, + { + "mutability": "Not" + } + ], + "spread_arg": null, + "var_debug_info": [] + }, + "name": "std::ptr::drop_in_place::<{closure@std::rt::lang_start<()>::{closure#0}}>" + } + }, + "symbol_name": "_ZN4core3ptr85drop_in_place$LT$std..rt..lang_start$LT$$LP$$RP$$GT$..$u7b$$u7b$closure$u7d$$u7d$$GT$17h" + }, + { + "details": null, + "mono_item_kind": { + "MonoItemFn": { + "body": { + "arg_count": 1, + "blocks": [ { "statements": [ - { - "kind": { - "StorageDead": 6 - }, - "span": 5 - }, { "kind": { "Assign": [ @@ -1667,168 +1489,49 @@ }, { "Use": { - "Copy": { - "local": 5, - "projection": [ - { - "Downcast": 0 - }, - { - "Field": [ - 0, - 6 - ] + "Constant": { + "const_": { + "kind": { + "Allocated": { + "align": 1, + "bytes": [ + 0 + ], + "mutability": "Mut", + "provenance": { + "ptrs": [] + } + } } - ] + }, + "user_ty": null } } } ] - }, - "span": 6 - }, - { - "kind": { - "StorageDead": 8 - }, - "span": 7 - }, - { - "kind": { - "StorageDead": 5 - }, - "span": 7 + } } ], "terminator": { - "kind": "Return", - "span": 4 + "kind": "Return" } } ], "locals": [ { - "mutability": "Mut", - "span": 8 - }, - { - "mutability": "Not", - "span": 9 - }, - { - "mutability": "Not", - "span": 10 - }, - { - "mutability": "Not", - "span": 11 - }, - { - "mutability": "Not", - "span": 12 - }, - { - "mutability": "Mut", - "span": 1 - }, - { - "mutability": "Mut", - "span": 2 - }, - { - "mutability": "Not", - "span": 2 + "mutability": "Mut" }, { - "mutability": "Not", - "span": 3 + "mutability": "Not" } ], - "span": 13, "spread_arg": null, - "var_debug_info": [ - { - "argument_index": 1, - "composite": null, - "name": "main", - "source_info": { - "scope": 0, - "span": 9 - }, - "value": { - "Place": { - "local": 1, - "projection": [] - } - } - }, - { - "argument_index": 2, - "composite": null, - "name": "argc", - "source_info": { - "scope": 0, - "span": 10 - }, - "value": { - "Place": { - "local": 2, - "projection": [] - } - } - }, - { - "argument_index": 3, - "composite": null, - "name": "argv", - "source_info": { - "scope": 0, - "span": 11 - }, - "value": { - "Place": { - "local": 3, - "projection": [] - } - } - }, - { - "argument_index": 4, - "composite": null, - "name": "sigpipe", - "source_info": { - "scope": 0, - "span": 12 - }, - "value": { - "Place": { - "local": 4, - "projection": [] - } - } - }, - { - "argument_index": null, - "composite": null, - "name": "v", - "source_info": { - "scope": 1, - "span": 6 - }, - "value": { - "Place": { - "local": 0, - "projection": [] - } - } - } - ] + "var_debug_info": [] }, - "id": 0, - "name": "std::rt::lang_start::<()>" + "name": "<() as std::process::Termination>::report" } }, - "symbol_name": "_ZN3std2rt10lang_start17h" + "symbol_name": "_ZN54_$LT$$LP$$RP$$u20$as$u20$std..process..Termination$GT$6report17h" } ], "types": [ @@ -1877,54 +1580,6 @@ } } ], - [ - { - "EnumType": { - "discriminants": [ - 0, - 1 - ], - "fields": "elided", - "layout": { - "abi": { - "Scalar": { - "Initialized": { - "valid_range": { - "end": 18446744073709551615, - "start": 0 - }, - "value": { - "Int": { - "length": "I64", - "signed": true - } - } - } - } - }, - "abi_align": 8, - "fields": { - "Arbitrary": { - "offsets": [ - { - "num_bits": 0 - } - ] - } - }, - "size": { - "num_bits": 64 - }, - "variants": { - "Single": { - "index": 0 - } - } - }, - "name": "std::result::Result" - } - } - ], [ { "StructType": { @@ -2278,39 +1933,6 @@ } } ], - [ - { - "RefType": { - "layout": { - "abi": { - "Scalar": { - "Initialized": { - "valid_range": { - "end": 18446744073709551615, - "start": 1 - }, - "value": { - "Pointer": 0 - } - } - } - }, - "abi_align": 8, - "fields": "Primitive", - "size": { - "num_bits": 64 - }, - "variants": { - "Single": { - "index": 0 - } - } - }, - "mutability": "Not", - "pointee_type": "elided" - } - } - ], [ { "RefType": { diff --git a/tests/integration/programs/div.smir.json.expected b/tests/integration/expected/nightly-2025-03-01/div.smir.json.expected similarity index 79% rename from tests/integration/programs/div.smir.json.expected rename to tests/integration/expected/nightly-2025-03-01/div.smir.json.expected index 66769d75..6181e455 100644 --- a/tests/integration/programs/div.smir.json.expected +++ b/tests/integration/expected/nightly-2025-03-01/div.smir.json.expected @@ -116,7 +116,6 @@ { "Constant": { "const_": { - "id": 10, "kind": { "Allocated": { "align": 4, @@ -133,14 +132,12 @@ } } }, - "span": 52, "user_ty": null } }, { "Constant": { "const_": { - "id": 11, "kind": { "Allocated": { "align": 4, @@ -157,15 +154,13 @@ } } }, - "span": 51, "user_ty": null } } ] } ] - }, - "span": 51 + } } ], "terminator": { @@ -182,7 +177,6 @@ "DivisionByZero": { "Constant": { "const_": { - "id": 9, "kind": { "Allocated": { "align": 4, @@ -199,7 +193,6 @@ } } }, - "span": 50, "user_ty": null } } @@ -207,8 +200,7 @@ "target": 1, "unwind": "Continue" } - }, - "span": 51 + } } }, { @@ -226,7 +218,6 @@ { "Constant": { "const_": { - "id": 10, "kind": { "Allocated": { "align": 4, @@ -243,14 +234,12 @@ } } }, - "span": 52, "user_ty": null } }, { "Constant": { "const_": { - "id": 12, "kind": { "Allocated": { "align": 4, @@ -267,15 +256,13 @@ } } }, - "span": 51, "user_ty": null } } ] } ] - }, - "span": 51 + } }, { "kind": { @@ -290,7 +277,6 @@ { "Constant": { "const_": { - "id": 9, "kind": { "Allocated": { "align": 4, @@ -307,14 +293,12 @@ } } }, - "span": 50, "user_ty": null } }, { "Constant": { "const_": { - "id": 13, "kind": { "Allocated": { "align": 4, @@ -331,15 +315,13 @@ } } }, - "span": 51, "user_ty": null } } ] } ] - }, - "span": 51 + } }, { "kind": { @@ -366,8 +348,7 @@ ] } ] - }, - "span": 51 + } } ], "terminator": { @@ -386,7 +367,6 @@ { "Constant": { "const_": { - "id": 9, "kind": { "Allocated": { "align": 4, @@ -403,14 +383,12 @@ } } }, - "span": 50, "user_ty": null } }, { "Constant": { "const_": { - "id": 10, "kind": { "Allocated": { "align": 4, @@ -427,7 +405,6 @@ } } }, - "span": 52, "user_ty": null } } @@ -436,8 +413,7 @@ "target": 2, "unwind": "Continue" } - }, - "span": 51 + } } }, { @@ -455,7 +431,6 @@ { "Constant": { "const_": { - "id": 9, "kind": { "Allocated": { "align": 4, @@ -472,14 +447,12 @@ } } }, - "span": 50, "user_ty": null } }, { "Constant": { "const_": { - "id": 10, "kind": { "Allocated": { "align": 4, @@ -496,15 +469,13 @@ } } }, - "span": 52, "user_ty": null } } ] } ] - }, - "span": 51 + } } ], "terminator": { @@ -526,15 +497,13 @@ "otherwise": 4 } } - }, - "span": 53 + } } }, { "statements": [], "terminator": { - "kind": "Return", - "span": 54 + "kind": "Return" } }, { @@ -546,7 +515,6 @@ { "Constant": { "const_": { - "id": 15, "kind": { "Allocated": { "align": 8, @@ -580,7 +548,6 @@ } } }, - "span": 32, "user_ty": null } } @@ -592,56 +559,44 @@ "func": { "Constant": { "const_": { - "id": 14, "kind": "ZeroSized" }, - "span": 55, "user_ty": null } }, "target": null, "unwind": "Continue" } - }, - "span": 55 + } } } ], "locals": [ { - "mutability": "Mut", - "span": 56 + "mutability": "Mut" }, { - "mutability": "Mut", - "span": 51 + "mutability": "Mut" }, { - "mutability": "Mut", - "span": 51 + "mutability": "Mut" }, { - "mutability": "Mut", - "span": 51 + "mutability": "Mut" }, { - "mutability": "Mut", - "span": 51 + "mutability": "Mut" }, { - "mutability": "Mut", - "span": 51 + "mutability": "Mut" }, { - "mutability": "Mut", - "span": 55 + "mutability": "Mut" } ], - "span": 57, "spread_arg": null, "var_debug_info": [] }, - "id": 6, "name": "main" } }, @@ -652,63 +607,134 @@ "mono_item_kind": { "MonoItemFn": { "body": { - "arg_count": 1, - "blocks": [ - { - "statements": [], - "terminator": { - "kind": "Return", - "span": 44 - } - } - ], - "locals": [ - { - "mutability": "Mut", - "span": 44 - }, - { - "mutability": "Not", - "span": 44 - } - ], - "span": 44, - "spread_arg": null, - "var_debug_info": [] - }, - "id": 4, - "name": "std::ptr::drop_in_place::<{closure@std::rt::lang_start<()>::{closure#0}}>" - } - }, - "symbol_name": "_ZN4core3ptr85drop_in_place$LT$std..rt..lang_start$LT$$LP$$RP$$GT$..$u7b$$u7b$closure$u7d$$u7d$$GT$17h" - }, - { - "details": null, - "mono_item_kind": { - "MonoItemFn": { - "body": { - "arg_count": 1, + "arg_count": 4, "blocks": [ { - "statements": [], + "statements": [ + { + "kind": { + "StorageLive": 5 + } + }, + { + "kind": { + "StorageLive": 7 + } + }, + { + "kind": { + "Assign": [ + { + "local": 7, + "projection": [] + }, + { + "Aggregate": [ + { + "Closure": [ + 0, + [ + { + "Type": 0 + }, + { + "Type": 0 + }, + { + "Type": 0 + }, + { + "Type": 0 + } + ] + ] + }, + [ + { + "Copy": { + "local": 1, + "projection": [] + } + } + ] + ] + } + ] + } + }, + { + "kind": { + "Assign": [ + { + "local": 6, + "projection": [] + }, + { + "Ref": [ + { + "kind": "ReErased" + }, + "Shared", + { + "local": 7, + "projection": [] + } + ] + } + ] + } + }, + { + "kind": { + "Assign": [ + { + "local": 5, + "projection": [] + }, + { + "Cast": [ + { + "PointerCoercion": "Unsize" + }, + { + "Copy": { + "local": 6, + "projection": [] + } + }, + 0 + ] + } + ] + } + } + ], "terminator": { "kind": { "Call": { "args": [ { "Move": { - "local": 1, + "local": 5, "projection": [] } }, { - "Constant": { - "const_": { - "id": 4, - "kind": "ZeroSized" - }, - "span": 32, - "user_ty": null + "Move": { + "local": 2, + "projection": [] + } + }, + { + "Move": { + "local": 3, + "projection": [] + } + }, + { + "Move": { + "local": 4, + "projection": [] } } ], @@ -719,90 +745,69 @@ "func": { "Constant": { "const_": { - "id": 3, "kind": "ZeroSized" }, - "span": 31, "user_ty": null } }, "target": 1, "unwind": "Continue" } - }, - "span": 33 + } } }, { - "statements": [], - "terminator": { - "kind": { - "Call": { - "args": [ - { - "Constant": { - "const_": { - "id": 4, - "kind": "ZeroSized" - }, - "span": 32, - "user_ty": null - } - } - ], - "destination": { - "local": 2, - "projection": [] - }, - "func": { - "Constant": { - "const_": { - "id": 5, - "kind": "ZeroSized" - }, - "span": 34, - "user_ty": null - } - }, - "target": 2, - "unwind": "Unreachable" + "statements": [ + { + "kind": { + "StorageDead": 5 } }, - "span": 35 - } - }, - { - "statements": [], + { + "kind": { + "StorageDead": 7 + } + } + ], "terminator": { - "kind": "Return", - "span": 36 + "kind": "Return" } } ], "locals": [ { - "mutability": "Mut", - "span": 37 + "mutability": "Mut" + }, + { + "mutability": "Not" + }, + { + "mutability": "Not" + }, + { + "mutability": "Not" + }, + { + "mutability": "Not" + }, + { + "mutability": "Mut" }, { - "mutability": "Not", - "span": 38 + "mutability": "Not" }, { - "mutability": "Not", - "span": 39 + "mutability": "Not" } ], - "span": 42, "spread_arg": null, "var_debug_info": [ { "argument_index": 1, "composite": null, - "name": "f", + "name": "main", "source_info": { - "scope": 0, - "span": 38 + "scope": 0 }, "value": { "Place": { @@ -812,136 +817,53 @@ } }, { - "argument_index": null, + "argument_index": 2, "composite": null, - "name": "result", + "name": "argc", "source_info": { - "scope": 1, - "span": 40 + "scope": 0 }, "value": { "Place": { - "local": 0, + "local": 2, "projection": [] } } }, { - "argument_index": 1, + "argument_index": 3, "composite": null, - "name": "dummy", + "name": "argv", "source_info": { - "scope": 2, - "span": 41 + "scope": 0 }, "value": { - "Const": { - "const_": { - "id": 4, - "kind": "ZeroSized" - }, - "span": 32, - "user_ty": null + "Place": { + "local": 3, + "projection": [] + } + } + }, + { + "argument_index": 4, + "composite": null, + "name": "sigpipe", + "source_info": { + "scope": 0 + }, + "value": { + "Place": { + "local": 4, + "projection": [] } } } ] }, - "id": 2, - "name": "std::sys::backtrace::__rust_begin_short_backtrace::" + "name": "std::rt::lang_start::<()>" } }, - "symbol_name": "_ZN3std3sys9backtrace28__rust_begin_short_backtrace17h" - }, - { - "details": null, - "mono_item_kind": { - "MonoItemFn": { - "body": { - "arg_count": 1, - "blocks": [ - { - "statements": [ - { - "kind": { - "Assign": [ - { - "local": 0, - "projection": [] - }, - { - "Use": { - "Constant": { - "const_": { - "id": 8, - "kind": { - "Allocated": { - "align": 1, - "bytes": [ - 0 - ], - "mutability": "Mut", - "provenance": { - "ptrs": [] - } - } - } - }, - "span": 46, - "user_ty": null - } - } - } - ] - }, - "span": 46 - } - ], - "terminator": { - "kind": "Return", - "span": 45 - } - } - ], - "locals": [ - { - "mutability": "Mut", - "span": 47 - }, - { - "mutability": "Not", - "span": 48 - } - ], - "span": 49, - "spread_arg": null, - "var_debug_info": [ - { - "argument_index": 1, - "composite": null, - "name": "self", - "source_info": { - "scope": 0, - "span": 48 - }, - "value": { - "Const": { - "const_": { - "id": 4, - "kind": "ZeroSized" - }, - "span": 32, - "user_ty": null - } - } - } - ] - }, - "id": 5, - "name": "<() as std::process::Termination>::report" - } - }, - "symbol_name": "_ZN54_$LT$$LP$$RP$$u20$as$u20$std..process..Termination$GT$6report17h" + "symbol_name": "_ZN3std2rt10lang_start17h" }, { "details": null, @@ -955,20 +877,17 @@ { "kind": { "StorageLive": 2 - }, - "span": 16 + } }, { "kind": { "StorageLive": 3 - }, - "span": 15 + } }, { "kind": { "StorageLive": 4 - }, - "span": 17 + } }, { "kind": { @@ -986,7 +905,7 @@ { "Field": [ 0, - 7 + 0 ] } ] @@ -994,8 +913,7 @@ } } ] - }, - "span": 17 + } } ], "terminator": { @@ -1016,18 +934,15 @@ "func": { "Constant": { "const_": { - "id": 1, "kind": "ZeroSized" }, - "span": 14, "user_ty": null } }, "target": 1, "unwind": "Continue" } - }, - "span": 15 + } } }, { @@ -1035,8 +950,7 @@ { "kind": { "StorageDead": 4 - }, - "span": 19 + } } ], "terminator": { @@ -1057,18 +971,15 @@ "func": { "Constant": { "const_": { - "id": 2, "kind": "ZeroSized" }, - "span": 18, "user_ty": null } }, "target": 2, "unwind": "Continue" } - }, - "span": 16 + } } }, { @@ -1076,14 +987,12 @@ { "kind": { "StorageDead": 3 - }, - "span": 21 + } }, { "kind": { "StorageLive": 5 - }, - "span": 22 + } }, { "kind": { @@ -1092,42 +1001,6 @@ "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": { @@ -1136,13 +1009,13 @@ { "Field": [ 0, - 15 + 0 ] }, { "Field": [ 0, - 9 + 0 ] } ] @@ -1150,8 +1023,7 @@ } } ] - }, - "span": 23 + } }, { "kind": { @@ -1165,73 +1037,52 @@ "IntToInt", { "Move": { - "local": 6, + "local": 5, "projection": [] } }, - 16 + 0 ] } ] - }, - "span": 24 - }, - { - "kind": { - "StorageDead": 6 - }, - "span": 25 + } }, { "kind": { "StorageDead": 5 - }, - "span": 26 + } }, { "kind": { "StorageDead": 2 - }, - "span": 27 + } } ], "terminator": { - "kind": "Return", - "span": 20 + "kind": "Return" } } ], "locals": [ { - "mutability": "Mut", - "span": 28 + "mutability": "Mut" }, { - "mutability": "Mut", - "span": 3 + "mutability": "Mut" }, { - "mutability": "Mut", - "span": 16 + "mutability": "Mut" }, { - "mutability": "Mut", - "span": 15 + "mutability": "Mut" }, { - "mutability": "Mut", - "span": 17 + "mutability": "Mut" }, { - "mutability": "Mut", - "span": 22 - }, - { - "mutability": "Mut", - "span": 23 + "mutability": "Mut" } ], - "span": 3, "spread_arg": null, "var_debug_info": [ { @@ -1239,8 +1090,7 @@ "composite": null, "name": "main", "source_info": { - "scope": 0, - "span": 9 + "scope": 0 }, "value": { "Place": { @@ -1250,7 +1100,7 @@ { "Field": [ 0, - 7 + 0 ] } ] @@ -1262,8 +1112,7 @@ "composite": null, "name": "self", "source_info": { - "scope": 1, - "span": 29 + "scope": 1 }, "value": { "Place": { @@ -1271,25 +1120,9 @@ "projection": [] } } - }, - { - "argument_index": 1, - "composite": null, - "name": "self", - "source_info": { - "scope": 2, - "span": 30 - }, - "value": { - "Place": { - "local": 5, - "projection": [] - } - } } ] }, - "id": 1, "name": "std::rt::lang_start::<()>::{closure#0}" } }, @@ -1300,62 +1133,150 @@ "mono_item_kind": { "MonoItemFn": { "body": { - "arg_count": 2, + "arg_count": 1, "blocks": [ { "statements": [], "terminator": { "kind": { "Call": { - "args": [], + "args": [ + { + "Move": { + "local": 1, + "projection": [] + } + }, + { + "Constant": { + "const_": { + "kind": "ZeroSized" + }, + "user_ty": null + } + } + ], "destination": { "local": 0, "projection": [] }, "func": { - "Move": { - "local": 1, - "projection": [] + "Constant": { + "const_": { + "kind": "ZeroSized" + }, + "user_ty": null } }, "target": 1, "unwind": "Continue" } - }, - "span": 43 + } + } + }, + { + "statements": [], + "terminator": { + "kind": { + "Call": { + "args": [ + { + "Constant": { + "const_": { + "kind": "ZeroSized" + }, + "user_ty": null + } + } + ], + "destination": { + "local": 2, + "projection": [] + }, + "func": { + "Constant": { + "const_": { + "kind": "ZeroSized" + }, + "user_ty": null + } + }, + "target": 2, + "unwind": "Unreachable" + } + } } }, { "statements": [], "terminator": { - "kind": "Return", - "span": 43 + "kind": "Return" } } ], "locals": [ { - "mutability": "Mut", - "span": 43 + "mutability": "Mut" }, { - "mutability": "Not", - "span": 43 + "mutability": "Not" }, { - "mutability": "Not", - "span": 43 + "mutability": "Not" } ], - "span": 43, - "spread_arg": 2, - "var_debug_info": [] + "spread_arg": null, + "var_debug_info": [ + { + "argument_index": 1, + "composite": null, + "name": "f", + "source_info": { + "scope": 0 + }, + "value": { + "Place": { + "local": 1, + "projection": [] + } + } + }, + { + "argument_index": null, + "composite": null, + "name": "result", + "source_info": { + "scope": 1 + }, + "value": { + "Place": { + "local": 0, + "projection": [] + } + } + }, + { + "argument_index": 1, + "composite": null, + "name": "dummy", + "source_info": { + "scope": 2 + }, + "value": { + "Const": { + "const_": { + "kind": "ZeroSized" + }, + "user_ty": null + } + } + } + ] }, - "id": 3, - "name": ">::call_once" + "name": "std::sys::backtrace::__rust_begin_short_backtrace::" } }, - "symbol_name": "_ZN4core3ops8function6FnOnce9call_once17h" + "symbol_name": "_ZN3std3sys9backtrace28__rust_begin_short_backtrace17h" }, { "details": null, @@ -1392,52 +1313,98 @@ "func": { "Constant": { "const_": { - "id": 6, "kind": "ZeroSized" }, - "span": 43, "user_ty": null } }, "target": 1, "unwind": "Continue" } - }, - "span": 43 + } } }, { "statements": [], "terminator": { - "kind": "Return", - "span": 43 + "kind": "Return" } } ], "locals": [ { - "mutability": "Mut", - "span": 43 + "mutability": "Mut" }, { - "mutability": "Not", - "span": 43 + "mutability": "Not" }, { - "mutability": "Not", - "span": 43 + "mutability": "Not" } ], - "span": 43, "spread_arg": 2, "var_debug_info": [] }, - "id": 3, "name": "<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once" } }, "symbol_name": "_ZN4core3ops8function6FnOnce40call_once$u7b$$u7b$vtable.shim$u7d$$u7d$17h" }, + { + "details": null, + "mono_item_kind": { + "MonoItemFn": { + "body": { + "arg_count": 2, + "blocks": [ + { + "statements": [], + "terminator": { + "kind": { + "Call": { + "args": [], + "destination": { + "local": 0, + "projection": [] + }, + "func": { + "Move": { + "local": 1, + "projection": [] + } + }, + "target": 1, + "unwind": "Continue" + } + } + } + }, + { + "statements": [], + "terminator": { + "kind": "Return" + } + } + ], + "locals": [ + { + "mutability": "Mut" + }, + { + "mutability": "Not" + }, + { + "mutability": "Not" + } + ], + "spread_arg": 2, + "var_debug_info": [] + }, + "name": ">::call_once" + } + }, + "symbol_name": "_ZN4core3ops8function6FnOnce9call_once17h" + }, { "details": null, "mono_item_kind": { @@ -1471,8 +1438,7 @@ ] } ] - }, - "span": 43 + } } ], "terminator": { @@ -1499,10 +1465,8 @@ "func": { "Constant": { "const_": { - "id": 7, "kind": "ZeroSized" }, - "span": 43, "user_ty": null } }, @@ -1511,8 +1475,7 @@ "Cleanup": 3 } } - }, - "span": 43 + } } }, { @@ -1527,15 +1490,13 @@ "target": 2, "unwind": "Continue" } - }, - "span": 43 + } } }, { "statements": [], "terminator": { - "kind": "Return", - "span": 43 + "kind": "Return" } }, { @@ -1550,222 +1511,77 @@ "target": 4, "unwind": "Terminate" } - }, - "span": 43 - } - }, - { - "statements": [], - "terminator": { - "kind": "Resume", - "span": 43 - } - } - ], - "locals": [ - { - "mutability": "Mut", - "span": 43 - }, - { - "mutability": "Not", - "span": 43 - }, - { - "mutability": "Not", - "span": 43 - }, - { - "mutability": "Not", - "span": 43 - } - ], - "span": 43, - "spread_arg": 2, - "var_debug_info": [] - }, - "id": 3, - "name": "<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once" - } - }, - "symbol_name": "_ZN4core3ops8function6FnOnce9call_once17h" - }, - { - "details": null, - "mono_item_kind": { - "MonoItemFn": { - "body": { - "arg_count": 4, - "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": { - "args": [ - { - "Move": { - "local": 6, - "projection": [] - } - }, - { - "Move": { - "local": 2, - "projection": [] - } - }, - { - "Move": { - "local": 3, - "projection": [] - } - }, - { - "Move": { - "local": 4, - "projection": [] - } - } - ], - "destination": { - "local": 5, - "projection": [] - }, - "func": { - "Constant": { - "const_": { - "id": 0, - "kind": "ZeroSized" - }, - "span": 0, - "user_ty": null - } - }, - "target": 1, - "unwind": "Continue" - } - }, - "span": 1 } }, + { + "statements": [], + "terminator": { + "kind": "Resume" + } + } + ], + "locals": [ + { + "mutability": "Mut" + }, + { + "mutability": "Not" + }, + { + "mutability": "Not" + }, + { + "mutability": "Not" + } + ], + "spread_arg": 2, + "var_debug_info": [] + }, + "name": "<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once" + } + }, + "symbol_name": "_ZN4core3ops8function6FnOnce9call_once17h" + }, + { + "details": null, + "mono_item_kind": { + "MonoItemFn": { + "body": { + "arg_count": 1, + "blocks": [ + { + "statements": [], + "terminator": { + "kind": "Return" + } + } + ], + "locals": [ + { + "mutability": "Mut" + }, + { + "mutability": "Not" + } + ], + "spread_arg": null, + "var_debug_info": [] + }, + "name": "std::ptr::drop_in_place::<{closure@std::rt::lang_start<()>::{closure#0}}>" + } + }, + "symbol_name": "_ZN4core3ptr85drop_in_place$LT$std..rt..lang_start$LT$$LP$$RP$$GT$..$u7b$$u7b$closure$u7d$$u7d$$GT$17h" + }, + { + "details": null, + "mono_item_kind": { + "MonoItemFn": { + "body": { + "arg_count": 1, + "blocks": [ { "statements": [ - { - "kind": { - "StorageDead": 6 - }, - "span": 5 - }, { "kind": { "Assign": [ @@ -1775,168 +1591,49 @@ }, { "Use": { - "Copy": { - "local": 5, - "projection": [ - { - "Downcast": 0 - }, - { - "Field": [ - 0, - 6 - ] + "Constant": { + "const_": { + "kind": { + "Allocated": { + "align": 1, + "bytes": [ + 0 + ], + "mutability": "Mut", + "provenance": { + "ptrs": [] + } + } } - ] + }, + "user_ty": null } } } ] - }, - "span": 6 - }, - { - "kind": { - "StorageDead": 8 - }, - "span": 7 - }, - { - "kind": { - "StorageDead": 5 - }, - "span": 7 + } } ], "terminator": { - "kind": "Return", - "span": 4 + "kind": "Return" } } ], "locals": [ { - "mutability": "Mut", - "span": 8 - }, - { - "mutability": "Not", - "span": 9 - }, - { - "mutability": "Not", - "span": 10 - }, - { - "mutability": "Not", - "span": 11 - }, - { - "mutability": "Not", - "span": 12 - }, - { - "mutability": "Mut", - "span": 1 - }, - { - "mutability": "Mut", - "span": 2 - }, - { - "mutability": "Not", - "span": 2 + "mutability": "Mut" }, { - "mutability": "Not", - "span": 3 + "mutability": "Not" } ], - "span": 13, "spread_arg": null, - "var_debug_info": [ - { - "argument_index": 1, - "composite": null, - "name": "main", - "source_info": { - "scope": 0, - "span": 9 - }, - "value": { - "Place": { - "local": 1, - "projection": [] - } - } - }, - { - "argument_index": 2, - "composite": null, - "name": "argc", - "source_info": { - "scope": 0, - "span": 10 - }, - "value": { - "Place": { - "local": 2, - "projection": [] - } - } - }, - { - "argument_index": 3, - "composite": null, - "name": "argv", - "source_info": { - "scope": 0, - "span": 11 - }, - "value": { - "Place": { - "local": 3, - "projection": [] - } - } - }, - { - "argument_index": 4, - "composite": null, - "name": "sigpipe", - "source_info": { - "scope": 0, - "span": 12 - }, - "value": { - "Place": { - "local": 4, - "projection": [] - } - } - }, - { - "argument_index": null, - "composite": null, - "name": "v", - "source_info": { - "scope": 1, - "span": 6 - }, - "value": { - "Place": { - "local": 0, - "projection": [] - } - } - } - ] + "var_debug_info": [] }, - "id": 0, - "name": "std::rt::lang_start::<()>" + "name": "<() as std::process::Termination>::report" } }, - "symbol_name": "_ZN3std2rt10lang_start17h" + "symbol_name": "_ZN54_$LT$$LP$$RP$$u20$as$u20$std..process..Termination$GT$6report17h" } ], "types": [ @@ -1978,54 +1675,6 @@ } } ], - [ - { - "EnumType": { - "discriminants": [ - 0, - 1 - ], - "fields": "elided", - "layout": { - "abi": { - "Scalar": { - "Initialized": { - "valid_range": { - "end": 18446744073709551615, - "start": 0 - }, - "value": { - "Int": { - "length": "I64", - "signed": true - } - } - } - } - }, - "abi_align": 8, - "fields": { - "Arbitrary": { - "offsets": [ - { - "num_bits": 0 - } - ] - } - }, - "size": { - "num_bits": 64 - }, - "variants": { - "Single": { - "index": 0 - } - } - }, - "name": "std::result::Result" - } - } - ], [ { "StructType": { @@ -2379,39 +2028,6 @@ } } ], - [ - { - "RefType": { - "layout": { - "abi": { - "Scalar": { - "Initialized": { - "valid_range": { - "end": 18446744073709551615, - "start": 1 - }, - "value": { - "Pointer": 0 - } - } - } - }, - "abi_align": 8, - "fields": "Primitive", - "size": { - "num_bits": 64 - }, - "variants": { - "Single": { - "index": 0 - } - } - }, - "mutability": "Not", - "pointee_type": "elided" - } - } - ], [ { "RefType": { diff --git a/tests/integration/programs/double-ref-deref.smir.json.expected b/tests/integration/expected/nightly-2025-03-01/double-ref-deref.smir.json.expected similarity index 78% rename from tests/integration/programs/double-ref-deref.smir.json.expected rename to tests/integration/expected/nightly-2025-03-01/double-ref-deref.smir.json.expected index 35a74128..cfd20951 100644 --- a/tests/integration/programs/double-ref-deref.smir.json.expected +++ b/tests/integration/expected/nightly-2025-03-01/double-ref-deref.smir.json.expected @@ -109,7 +109,6 @@ "Use": { "Constant": { "const_": { - "id": 9, "kind": { "Allocated": { "align": 4, @@ -126,14 +125,12 @@ } } }, - "span": 51, "user_ty": null } } } ] - }, - "span": 51 + } }, { "kind": { @@ -155,8 +152,7 @@ ] } ] - }, - "span": 52 + } }, { "kind": { @@ -178,8 +174,7 @@ ] } ] - }, - "span": 53 + } }, { "kind": { @@ -197,8 +192,7 @@ } } ] - }, - "span": 54 + } }, { "kind": { @@ -218,8 +212,7 @@ } } ] - }, - "span": 54 + } } ], "terminator": { @@ -241,15 +234,13 @@ "otherwise": 2 } } - }, - "span": 50 + } } }, { "statements": [], "terminator": { - "kind": "Return", - "span": 55 + "kind": "Return" } }, { @@ -261,7 +252,6 @@ { "Constant": { "const_": { - "id": 11, "kind": { "Allocated": { "align": 8, @@ -295,7 +285,6 @@ } } }, - "span": 32, "user_ty": null } } @@ -307,52 +296,41 @@ "func": { "Constant": { "const_": { - "id": 10, "kind": "ZeroSized" }, - "span": 56, "user_ty": null } }, "target": null, "unwind": "Continue" } - }, - "span": 56 + } } } ], "locals": [ { - "mutability": "Mut", - "span": 57 + "mutability": "Mut" }, { - "mutability": "Not", - "span": 58 + "mutability": "Not" }, { - "mutability": "Not", - "span": 59 + "mutability": "Not" }, { - "mutability": "Not", - "span": 60 + "mutability": "Not" }, { - "mutability": "Mut", - "span": 54 + "mutability": "Mut" }, { - "mutability": "Mut", - "span": 56 + "mutability": "Mut" }, { - "mutability": "Mut", - "span": 60 + "mutability": "Mut" } ], - "span": 61, "spread_arg": null, "var_debug_info": [ { @@ -360,8 +338,7 @@ "composite": null, "name": "a", "source_info": { - "scope": 1, - "span": 58 + "scope": 1 }, "value": { "Place": { @@ -375,8 +352,7 @@ "composite": null, "name": "b", "source_info": { - "scope": 2, - "span": 59 + "scope": 2 }, "value": { "Place": { @@ -390,8 +366,7 @@ "composite": null, "name": "c", "source_info": { - "scope": 3, - "span": 60 + "scope": 3 }, "value": { "Place": { @@ -402,7 +377,6 @@ } ] }, - "id": 6, "name": "main" } }, @@ -413,63 +387,134 @@ "mono_item_kind": { "MonoItemFn": { "body": { - "arg_count": 1, - "blocks": [ - { - "statements": [], - "terminator": { - "kind": "Return", - "span": 44 - } - } - ], - "locals": [ - { - "mutability": "Mut", - "span": 44 - }, - { - "mutability": "Not", - "span": 44 - } - ], - "span": 44, - "spread_arg": null, - "var_debug_info": [] - }, - "id": 4, - "name": "std::ptr::drop_in_place::<{closure@std::rt::lang_start<()>::{closure#0}}>" - } - }, - "symbol_name": "_ZN4core3ptr85drop_in_place$LT$std..rt..lang_start$LT$$LP$$RP$$GT$..$u7b$$u7b$closure$u7d$$u7d$$GT$17h" - }, - { - "details": null, - "mono_item_kind": { - "MonoItemFn": { - "body": { - "arg_count": 1, + "arg_count": 4, "blocks": [ { - "statements": [], + "statements": [ + { + "kind": { + "StorageLive": 5 + } + }, + { + "kind": { + "StorageLive": 7 + } + }, + { + "kind": { + "Assign": [ + { + "local": 7, + "projection": [] + }, + { + "Aggregate": [ + { + "Closure": [ + 0, + [ + { + "Type": 0 + }, + { + "Type": 0 + }, + { + "Type": 0 + }, + { + "Type": 0 + } + ] + ] + }, + [ + { + "Copy": { + "local": 1, + "projection": [] + } + } + ] + ] + } + ] + } + }, + { + "kind": { + "Assign": [ + { + "local": 6, + "projection": [] + }, + { + "Ref": [ + { + "kind": "ReErased" + }, + "Shared", + { + "local": 7, + "projection": [] + } + ] + } + ] + } + }, + { + "kind": { + "Assign": [ + { + "local": 5, + "projection": [] + }, + { + "Cast": [ + { + "PointerCoercion": "Unsize" + }, + { + "Copy": { + "local": 6, + "projection": [] + } + }, + 0 + ] + } + ] + } + } + ], "terminator": { "kind": { "Call": { "args": [ { "Move": { - "local": 1, + "local": 5, "projection": [] } }, { - "Constant": { - "const_": { - "id": 4, - "kind": "ZeroSized" - }, - "span": 32, - "user_ty": null + "Move": { + "local": 2, + "projection": [] + } + }, + { + "Move": { + "local": 3, + "projection": [] + } + }, + { + "Move": { + "local": 4, + "projection": [] } } ], @@ -480,90 +525,69 @@ "func": { "Constant": { "const_": { - "id": 3, "kind": "ZeroSized" }, - "span": 31, "user_ty": null } }, "target": 1, "unwind": "Continue" } - }, - "span": 33 + } } }, { - "statements": [], - "terminator": { - "kind": { - "Call": { - "args": [ - { - "Constant": { - "const_": { - "id": 4, - "kind": "ZeroSized" - }, - "span": 32, - "user_ty": null - } - } - ], - "destination": { - "local": 2, - "projection": [] - }, - "func": { - "Constant": { - "const_": { - "id": 5, - "kind": "ZeroSized" - }, - "span": 34, - "user_ty": null - } - }, - "target": 2, - "unwind": "Unreachable" + "statements": [ + { + "kind": { + "StorageDead": 5 } }, - "span": 35 - } - }, - { - "statements": [], + { + "kind": { + "StorageDead": 7 + } + } + ], "terminator": { - "kind": "Return", - "span": 36 + "kind": "Return" } } ], "locals": [ { - "mutability": "Mut", - "span": 37 + "mutability": "Mut" + }, + { + "mutability": "Not" + }, + { + "mutability": "Not" + }, + { + "mutability": "Not" + }, + { + "mutability": "Not" + }, + { + "mutability": "Mut" }, { - "mutability": "Not", - "span": 38 + "mutability": "Not" }, { - "mutability": "Not", - "span": 39 + "mutability": "Not" } ], - "span": 42, "spread_arg": null, "var_debug_info": [ { "argument_index": 1, "composite": null, - "name": "f", + "name": "main", "source_info": { - "scope": 0, - "span": 38 + "scope": 0 }, "value": { "Place": { @@ -573,136 +597,53 @@ } }, { - "argument_index": null, + "argument_index": 2, "composite": null, - "name": "result", + "name": "argc", "source_info": { - "scope": 1, - "span": 40 + "scope": 0 }, "value": { "Place": { - "local": 0, + "local": 2, "projection": [] } } }, { - "argument_index": 1, + "argument_index": 3, "composite": null, - "name": "dummy", + "name": "argv", "source_info": { - "scope": 2, - "span": 41 + "scope": 0 }, "value": { - "Const": { - "const_": { - "id": 4, - "kind": "ZeroSized" - }, - "span": 32, - "user_ty": null + "Place": { + "local": 3, + "projection": [] + } + } + }, + { + "argument_index": 4, + "composite": null, + "name": "sigpipe", + "source_info": { + "scope": 0 + }, + "value": { + "Place": { + "local": 4, + "projection": [] } } } ] }, - "id": 2, - "name": "std::sys::backtrace::__rust_begin_short_backtrace::" + "name": "std::rt::lang_start::<()>" } }, - "symbol_name": "_ZN3std3sys9backtrace28__rust_begin_short_backtrace17h" - }, - { - "details": null, - "mono_item_kind": { - "MonoItemFn": { - "body": { - "arg_count": 1, - "blocks": [ - { - "statements": [ - { - "kind": { - "Assign": [ - { - "local": 0, - "projection": [] - }, - { - "Use": { - "Constant": { - "const_": { - "id": 8, - "kind": { - "Allocated": { - "align": 1, - "bytes": [ - 0 - ], - "mutability": "Mut", - "provenance": { - "ptrs": [] - } - } - } - }, - "span": 46, - "user_ty": null - } - } - } - ] - }, - "span": 46 - } - ], - "terminator": { - "kind": "Return", - "span": 45 - } - } - ], - "locals": [ - { - "mutability": "Mut", - "span": 47 - }, - { - "mutability": "Not", - "span": 48 - } - ], - "span": 49, - "spread_arg": null, - "var_debug_info": [ - { - "argument_index": 1, - "composite": null, - "name": "self", - "source_info": { - "scope": 0, - "span": 48 - }, - "value": { - "Const": { - "const_": { - "id": 4, - "kind": "ZeroSized" - }, - "span": 32, - "user_ty": null - } - } - } - ] - }, - "id": 5, - "name": "<() as std::process::Termination>::report" - } - }, - "symbol_name": "_ZN54_$LT$$LP$$RP$$u20$as$u20$std..process..Termination$GT$6report17h" + "symbol_name": "_ZN3std2rt10lang_start17h" }, { "details": null, @@ -716,20 +657,17 @@ { "kind": { "StorageLive": 2 - }, - "span": 16 + } }, { "kind": { "StorageLive": 3 - }, - "span": 15 + } }, { "kind": { "StorageLive": 4 - }, - "span": 17 + } }, { "kind": { @@ -747,7 +685,7 @@ { "Field": [ 0, - 7 + 0 ] } ] @@ -755,8 +693,7 @@ } } ] - }, - "span": 17 + } } ], "terminator": { @@ -777,18 +714,15 @@ "func": { "Constant": { "const_": { - "id": 1, "kind": "ZeroSized" }, - "span": 14, "user_ty": null } }, "target": 1, "unwind": "Continue" } - }, - "span": 15 + } } }, { @@ -796,8 +730,7 @@ { "kind": { "StorageDead": 4 - }, - "span": 19 + } } ], "terminator": { @@ -818,18 +751,15 @@ "func": { "Constant": { "const_": { - "id": 2, "kind": "ZeroSized" }, - "span": 18, "user_ty": null } }, "target": 2, "unwind": "Continue" } - }, - "span": 16 + } } }, { @@ -837,14 +767,12 @@ { "kind": { "StorageDead": 3 - }, - "span": 21 + } }, { "kind": { "StorageLive": 5 - }, - "span": 22 + } }, { "kind": { @@ -853,42 +781,6 @@ "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": { @@ -897,13 +789,13 @@ { "Field": [ 0, - 15 + 0 ] }, { "Field": [ 0, - 9 + 0 ] } ] @@ -911,8 +803,7 @@ } } ] - }, - "span": 23 + } }, { "kind": { @@ -926,73 +817,52 @@ "IntToInt", { "Move": { - "local": 6, + "local": 5, "projection": [] } }, - 16 + 0 ] } ] - }, - "span": 24 - }, - { - "kind": { - "StorageDead": 6 - }, - "span": 25 + } }, { "kind": { "StorageDead": 5 - }, - "span": 26 + } }, { "kind": { "StorageDead": 2 - }, - "span": 27 + } } ], "terminator": { - "kind": "Return", - "span": 20 + "kind": "Return" } } ], "locals": [ { - "mutability": "Mut", - "span": 28 - }, - { - "mutability": "Mut", - "span": 3 + "mutability": "Mut" }, { - "mutability": "Mut", - "span": 16 + "mutability": "Mut" }, { - "mutability": "Mut", - "span": 15 + "mutability": "Mut" }, { - "mutability": "Mut", - "span": 17 + "mutability": "Mut" }, { - "mutability": "Mut", - "span": 22 + "mutability": "Mut" }, { - "mutability": "Mut", - "span": 23 + "mutability": "Mut" } ], - "span": 3, "spread_arg": null, "var_debug_info": [ { @@ -1000,8 +870,7 @@ "composite": null, "name": "main", "source_info": { - "scope": 0, - "span": 9 + "scope": 0 }, "value": { "Place": { @@ -1011,7 +880,7 @@ { "Field": [ 0, - 7 + 0 ] } ] @@ -1023,8 +892,7 @@ "composite": null, "name": "self", "source_info": { - "scope": 1, - "span": 29 + "scope": 1 }, "value": { "Place": { @@ -1032,25 +900,9 @@ "projection": [] } } - }, - { - "argument_index": 1, - "composite": null, - "name": "self", - "source_info": { - "scope": 2, - "span": 30 - }, - "value": { - "Place": { - "local": 5, - "projection": [] - } - } } ] }, - "id": 1, "name": "std::rt::lang_start::<()>::{closure#0}" } }, @@ -1061,62 +913,150 @@ "mono_item_kind": { "MonoItemFn": { "body": { - "arg_count": 2, + "arg_count": 1, "blocks": [ { "statements": [], "terminator": { "kind": { "Call": { - "args": [], + "args": [ + { + "Move": { + "local": 1, + "projection": [] + } + }, + { + "Constant": { + "const_": { + "kind": "ZeroSized" + }, + "user_ty": null + } + } + ], "destination": { "local": 0, "projection": [] }, "func": { - "Move": { - "local": 1, - "projection": [] + "Constant": { + "const_": { + "kind": "ZeroSized" + }, + "user_ty": null } }, "target": 1, "unwind": "Continue" } - }, - "span": 43 + } + } + }, + { + "statements": [], + "terminator": { + "kind": { + "Call": { + "args": [ + { + "Constant": { + "const_": { + "kind": "ZeroSized" + }, + "user_ty": null + } + } + ], + "destination": { + "local": 2, + "projection": [] + }, + "func": { + "Constant": { + "const_": { + "kind": "ZeroSized" + }, + "user_ty": null + } + }, + "target": 2, + "unwind": "Unreachable" + } + } } }, { "statements": [], "terminator": { - "kind": "Return", - "span": 43 + "kind": "Return" } } ], "locals": [ { - "mutability": "Mut", - "span": 43 + "mutability": "Mut" }, { - "mutability": "Not", - "span": 43 + "mutability": "Not" }, { - "mutability": "Not", - "span": 43 + "mutability": "Not" } ], - "span": 43, - "spread_arg": 2, - "var_debug_info": [] + "spread_arg": null, + "var_debug_info": [ + { + "argument_index": 1, + "composite": null, + "name": "f", + "source_info": { + "scope": 0 + }, + "value": { + "Place": { + "local": 1, + "projection": [] + } + } + }, + { + "argument_index": null, + "composite": null, + "name": "result", + "source_info": { + "scope": 1 + }, + "value": { + "Place": { + "local": 0, + "projection": [] + } + } + }, + { + "argument_index": 1, + "composite": null, + "name": "dummy", + "source_info": { + "scope": 2 + }, + "value": { + "Const": { + "const_": { + "kind": "ZeroSized" + }, + "user_ty": null + } + } + } + ] }, - "id": 3, - "name": ">::call_once" + "name": "std::sys::backtrace::__rust_begin_short_backtrace::" } }, - "symbol_name": "_ZN4core3ops8function6FnOnce9call_once17h" + "symbol_name": "_ZN3std3sys9backtrace28__rust_begin_short_backtrace17h" }, { "details": null, @@ -1153,52 +1093,98 @@ "func": { "Constant": { "const_": { - "id": 6, "kind": "ZeroSized" }, - "span": 43, "user_ty": null } }, "target": 1, "unwind": "Continue" } - }, - "span": 43 + } } }, { "statements": [], "terminator": { - "kind": "Return", - "span": 43 + "kind": "Return" } } ], "locals": [ { - "mutability": "Mut", - "span": 43 + "mutability": "Mut" }, { - "mutability": "Not", - "span": 43 + "mutability": "Not" }, { - "mutability": "Not", - "span": 43 + "mutability": "Not" } ], - "span": 43, "spread_arg": 2, "var_debug_info": [] }, - "id": 3, "name": "<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once" } }, "symbol_name": "_ZN4core3ops8function6FnOnce40call_once$u7b$$u7b$vtable.shim$u7d$$u7d$17h" }, + { + "details": null, + "mono_item_kind": { + "MonoItemFn": { + "body": { + "arg_count": 2, + "blocks": [ + { + "statements": [], + "terminator": { + "kind": { + "Call": { + "args": [], + "destination": { + "local": 0, + "projection": [] + }, + "func": { + "Move": { + "local": 1, + "projection": [] + } + }, + "target": 1, + "unwind": "Continue" + } + } + } + }, + { + "statements": [], + "terminator": { + "kind": "Return" + } + } + ], + "locals": [ + { + "mutability": "Mut" + }, + { + "mutability": "Not" + }, + { + "mutability": "Not" + } + ], + "spread_arg": 2, + "var_debug_info": [] + }, + "name": ">::call_once" + } + }, + "symbol_name": "_ZN4core3ops8function6FnOnce9call_once17h" + }, { "details": null, "mono_item_kind": { @@ -1232,8 +1218,7 @@ ] } ] - }, - "span": 43 + } } ], "terminator": { @@ -1260,10 +1245,8 @@ "func": { "Constant": { "const_": { - "id": 7, "kind": "ZeroSized" }, - "span": 43, "user_ty": null } }, @@ -1272,8 +1255,7 @@ "Cleanup": 3 } } - }, - "span": 43 + } } }, { @@ -1288,15 +1270,13 @@ "target": 2, "unwind": "Continue" } - }, - "span": 43 + } } }, { "statements": [], "terminator": { - "kind": "Return", - "span": 43 + "kind": "Return" } }, { @@ -1311,222 +1291,77 @@ "target": 4, "unwind": "Terminate" } - }, - "span": 43 - } - }, - { - "statements": [], - "terminator": { - "kind": "Resume", - "span": 43 - } - } - ], - "locals": [ - { - "mutability": "Mut", - "span": 43 - }, - { - "mutability": "Not", - "span": 43 - }, - { - "mutability": "Not", - "span": 43 - }, - { - "mutability": "Not", - "span": 43 - } - ], - "span": 43, - "spread_arg": 2, - "var_debug_info": [] - }, - "id": 3, - "name": "<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once" - } - }, - "symbol_name": "_ZN4core3ops8function6FnOnce9call_once17h" - }, - { - "details": null, - "mono_item_kind": { - "MonoItemFn": { - "body": { - "arg_count": 4, - "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": { - "args": [ - { - "Move": { - "local": 6, - "projection": [] - } - }, - { - "Move": { - "local": 2, - "projection": [] - } - }, - { - "Move": { - "local": 3, - "projection": [] - } - }, - { - "Move": { - "local": 4, - "projection": [] - } - } - ], - "destination": { - "local": 5, - "projection": [] - }, - "func": { - "Constant": { - "const_": { - "id": 0, - "kind": "ZeroSized" - }, - "span": 0, - "user_ty": null - } - }, - "target": 1, - "unwind": "Continue" - } - }, - "span": 1 } }, + { + "statements": [], + "terminator": { + "kind": "Resume" + } + } + ], + "locals": [ + { + "mutability": "Mut" + }, + { + "mutability": "Not" + }, + { + "mutability": "Not" + }, + { + "mutability": "Not" + } + ], + "spread_arg": 2, + "var_debug_info": [] + }, + "name": "<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once" + } + }, + "symbol_name": "_ZN4core3ops8function6FnOnce9call_once17h" + }, + { + "details": null, + "mono_item_kind": { + "MonoItemFn": { + "body": { + "arg_count": 1, + "blocks": [ + { + "statements": [], + "terminator": { + "kind": "Return" + } + } + ], + "locals": [ + { + "mutability": "Mut" + }, + { + "mutability": "Not" + } + ], + "spread_arg": null, + "var_debug_info": [] + }, + "name": "std::ptr::drop_in_place::<{closure@std::rt::lang_start<()>::{closure#0}}>" + } + }, + "symbol_name": "_ZN4core3ptr85drop_in_place$LT$std..rt..lang_start$LT$$LP$$RP$$GT$..$u7b$$u7b$closure$u7d$$u7d$$GT$17h" + }, + { + "details": null, + "mono_item_kind": { + "MonoItemFn": { + "body": { + "arg_count": 1, + "blocks": [ { "statements": [ - { - "kind": { - "StorageDead": 6 - }, - "span": 5 - }, { "kind": { "Assign": [ @@ -1536,168 +1371,49 @@ }, { "Use": { - "Copy": { - "local": 5, - "projection": [ - { - "Downcast": 0 - }, - { - "Field": [ - 0, - 6 - ] + "Constant": { + "const_": { + "kind": { + "Allocated": { + "align": 1, + "bytes": [ + 0 + ], + "mutability": "Mut", + "provenance": { + "ptrs": [] + } + } } - ] + }, + "user_ty": null } } } ] - }, - "span": 6 - }, - { - "kind": { - "StorageDead": 8 - }, - "span": 7 - }, - { - "kind": { - "StorageDead": 5 - }, - "span": 7 + } } ], "terminator": { - "kind": "Return", - "span": 4 + "kind": "Return" } } ], "locals": [ { - "mutability": "Mut", - "span": 8 - }, - { - "mutability": "Not", - "span": 9 - }, - { - "mutability": "Not", - "span": 10 - }, - { - "mutability": "Not", - "span": 11 - }, - { - "mutability": "Not", - "span": 12 - }, - { - "mutability": "Mut", - "span": 1 - }, - { - "mutability": "Mut", - "span": 2 - }, - { - "mutability": "Not", - "span": 2 + "mutability": "Mut" }, { - "mutability": "Not", - "span": 3 + "mutability": "Not" } ], - "span": 13, "spread_arg": null, - "var_debug_info": [ - { - "argument_index": 1, - "composite": null, - "name": "main", - "source_info": { - "scope": 0, - "span": 9 - }, - "value": { - "Place": { - "local": 1, - "projection": [] - } - } - }, - { - "argument_index": 2, - "composite": null, - "name": "argc", - "source_info": { - "scope": 0, - "span": 10 - }, - "value": { - "Place": { - "local": 2, - "projection": [] - } - } - }, - { - "argument_index": 3, - "composite": null, - "name": "argv", - "source_info": { - "scope": 0, - "span": 11 - }, - "value": { - "Place": { - "local": 3, - "projection": [] - } - } - }, - { - "argument_index": 4, - "composite": null, - "name": "sigpipe", - "source_info": { - "scope": 0, - "span": 12 - }, - "value": { - "Place": { - "local": 4, - "projection": [] - } - } - }, - { - "argument_index": null, - "composite": null, - "name": "v", - "source_info": { - "scope": 1, - "span": 6 - }, - "value": { - "Place": { - "local": 0, - "projection": [] - } - } - } - ] + "var_debug_info": [] }, - "id": 0, - "name": "std::rt::lang_start::<()>" + "name": "<() as std::process::Termination>::report" } }, - "symbol_name": "_ZN3std2rt10lang_start17h" + "symbol_name": "_ZN54_$LT$$LP$$RP$$u20$as$u20$std..process..Termination$GT$6report17h" } ], "types": [ @@ -1734,54 +1450,6 @@ } } ], - [ - { - "EnumType": { - "discriminants": [ - 0, - 1 - ], - "fields": "elided", - "layout": { - "abi": { - "Scalar": { - "Initialized": { - "valid_range": { - "end": 18446744073709551615, - "start": 0 - }, - "value": { - "Int": { - "length": "I64", - "signed": true - } - } - } - } - }, - "abi_align": 8, - "fields": { - "Arbitrary": { - "offsets": [ - { - "num_bits": 0 - } - ] - } - }, - "size": { - "num_bits": 64 - }, - "variants": { - "Single": { - "index": 0 - } - } - }, - "name": "std::result::Result" - } - } - ], [ { "StructType": { @@ -2201,39 +1869,6 @@ } } ], - [ - { - "RefType": { - "layout": { - "abi": { - "Scalar": { - "Initialized": { - "valid_range": { - "end": 18446744073709551615, - "start": 1 - }, - "value": { - "Pointer": 0 - } - } - } - }, - "abi_align": 8, - "fields": "Primitive", - "size": { - "num_bits": 64 - }, - "variants": { - "Single": { - "index": 0 - } - } - }, - "mutability": "Not", - "pointee_type": "elided" - } - } - ], [ { "RefType": { diff --git a/tests/integration/programs/enum.smir.json.expected b/tests/integration/expected/nightly-2025-03-01/enum.smir.json.expected similarity index 75% rename from tests/integration/programs/enum.smir.json.expected rename to tests/integration/expected/nightly-2025-03-01/enum.smir.json.expected index 1a39027a..83511e53 100644 --- a/tests/integration/programs/enum.smir.json.expected +++ b/tests/integration/expected/nightly-2025-03-01/enum.smir.json.expected @@ -48,140 +48,134 @@ "mono_item_kind": { "MonoItemFn": { "body": { - "arg_count": 0, + "arg_count": 4, "blocks": [ { "statements": [ + { + "kind": { + "StorageLive": 5 + } + }, + { + "kind": { + "StorageLive": 7 + } + }, { "kind": { "Assign": [ { - "local": 1, + "local": 7, "projection": [] }, { "Aggregate": [ { - "Adt": [ - 7, + "Closure": [ 0, - [], - null, - null + [ + { + "Type": 0 + }, + { + "Type": 0 + }, + { + "Type": 0 + }, + { + "Type": 0 + } + ] ] }, - [] + [ + { + "Copy": { + "local": 1, + "projection": [] + } + } + ] ] } ] - }, - "span": 51 + } + }, + { + "kind": { + "Assign": [ + { + "local": 6, + "projection": [] + }, + { + "Ref": [ + { + "kind": "ReErased" + }, + "Shared", + { + "local": 7, + "projection": [] + } + ] + } + ] + } + }, + { + "kind": { + "Assign": [ + { + "local": 5, + "projection": [] + }, + { + "Cast": [ + { + "PointerCoercion": "Unsize" + }, + { + "Copy": { + "local": 6, + "projection": [] + } + }, + 0 + ] + } + ] + } } ], - "terminator": { - "kind": "Return", - "span": 50 - } - } - ], - "locals": [ - { - "mutability": "Mut", - "span": 52 - }, - { - "mutability": "Not", - "span": 53 - } - ], - "span": 54, - "spread_arg": null, - "var_debug_info": [ - { - "argument_index": null, - "composite": null, - "name": "a", - "source_info": { - "scope": 1, - "span": 53 - }, - "value": { - "Place": { - "local": 1, - "projection": [] - } - } - } - ] - }, - "id": 6, - "name": "main" - } - }, - "symbol_name": "_ZN4enum4main17h" - }, - { - "details": null, - "mono_item_kind": { - "MonoItemFn": { - "body": { - "arg_count": 1, - "blocks": [ - { - "statements": [], - "terminator": { - "kind": "Return", - "span": 44 - } - } - ], - "locals": [ - { - "mutability": "Mut", - "span": 44 - }, - { - "mutability": "Not", - "span": 44 - } - ], - "span": 44, - "spread_arg": null, - "var_debug_info": [] - }, - "id": 4, - "name": "std::ptr::drop_in_place::<{closure@std::rt::lang_start<()>::{closure#0}}>" - } - }, - "symbol_name": "_ZN4core3ptr85drop_in_place$LT$std..rt..lang_start$LT$$LP$$RP$$GT$..$u7b$$u7b$closure$u7d$$u7d$$GT$17h" - }, - { - "details": null, - "mono_item_kind": { - "MonoItemFn": { - "body": { - "arg_count": 1, - "blocks": [ - { - "statements": [], "terminator": { "kind": { "Call": { "args": [ { "Move": { - "local": 1, + "local": 5, "projection": [] } }, { - "Constant": { - "const_": { - "id": 4, - "kind": "ZeroSized" - }, - "span": 32, - "user_ty": null + "Move": { + "local": 2, + "projection": [] + } + }, + { + "Move": { + "local": 3, + "projection": [] + } + }, + { + "Move": { + "local": 4, + "projection": [] } } ], @@ -192,229 +186,125 @@ "func": { "Constant": { "const_": { - "id": 3, "kind": "ZeroSized" }, - "span": 31, "user_ty": null } }, "target": 1, "unwind": "Continue" } - }, - "span": 33 + } } }, { - "statements": [], - "terminator": { - "kind": { - "Call": { - "args": [ - { - "Constant": { - "const_": { - "id": 4, - "kind": "ZeroSized" - }, - "span": 32, - "user_ty": null - } - } - ], - "destination": { - "local": 2, - "projection": [] - }, - "func": { - "Constant": { - "const_": { - "id": 5, - "kind": "ZeroSized" - }, - "span": 34, - "user_ty": null - } - }, - "target": 2, - "unwind": "Unreachable" + "statements": [ + { + "kind": { + "StorageDead": 5 } }, - "span": 35 - } - }, - { - "statements": [], + { + "kind": { + "StorageDead": 7 + } + } + ], "terminator": { - "kind": "Return", - "span": 36 + "kind": "Return" } } ], "locals": [ { - "mutability": "Mut", - "span": 37 + "mutability": "Mut" }, { - "mutability": "Not", - "span": 38 + "mutability": "Not" }, { - "mutability": "Not", - "span": 39 - } - ], - "span": 42, - "spread_arg": null, - "var_debug_info": [ - { - "argument_index": 1, - "composite": null, - "name": "f", - "source_info": { - "scope": 0, - "span": 38 - }, - "value": { - "Place": { - "local": 1, - "projection": [] - } - } + "mutability": "Not" }, { - "argument_index": null, - "composite": null, - "name": "result", - "source_info": { - "scope": 1, - "span": 40 - }, - "value": { - "Place": { - "local": 0, - "projection": [] - } - } + "mutability": "Not" }, { - "argument_index": 1, - "composite": null, - "name": "dummy", - "source_info": { - "scope": 2, - "span": 41 - }, - "value": { - "Const": { - "const_": { - "id": 4, - "kind": "ZeroSized" - }, - "span": 32, - "user_ty": null - } - } - } - ] - }, - "id": 2, - "name": "std::sys::backtrace::__rust_begin_short_backtrace::" - } - }, - "symbol_name": "_ZN3std3sys9backtrace28__rust_begin_short_backtrace17h" - }, - { - "details": null, - "mono_item_kind": { - "MonoItemFn": { - "body": { - "arg_count": 1, - "blocks": [ - { - "statements": [ - { - "kind": { - "Assign": [ - { - "local": 0, - "projection": [] - }, - { - "Use": { - "Constant": { - "const_": { - "id": 8, - "kind": { - "Allocated": { - "align": 1, - "bytes": [ - 0 - ], - "mutability": "Mut", - "provenance": { - "ptrs": [] - } - } - } - }, - "span": 46, - "user_ty": null - } - } - } - ] - }, - "span": 46 - } - ], - "terminator": { - "kind": "Return", - "span": 45 - } - } - ], - "locals": [ + "mutability": "Not" + }, + { + "mutability": "Mut" + }, { - "mutability": "Mut", - "span": 47 + "mutability": "Not" }, { - "mutability": "Not", - "span": 48 + "mutability": "Not" } ], - "span": 49, "spread_arg": null, "var_debug_info": [ { "argument_index": 1, "composite": null, - "name": "self", + "name": "main", "source_info": { - "scope": 0, - "span": 48 + "scope": 0 }, "value": { - "Const": { - "const_": { - "id": 4, - "kind": "ZeroSized" - }, - "span": 32, - "user_ty": null + "Place": { + "local": 1, + "projection": [] + } + } + }, + { + "argument_index": 2, + "composite": null, + "name": "argc", + "source_info": { + "scope": 0 + }, + "value": { + "Place": { + "local": 2, + "projection": [] + } + } + }, + { + "argument_index": 3, + "composite": null, + "name": "argv", + "source_info": { + "scope": 0 + }, + "value": { + "Place": { + "local": 3, + "projection": [] + } + } + }, + { + "argument_index": 4, + "composite": null, + "name": "sigpipe", + "source_info": { + "scope": 0 + }, + "value": { + "Place": { + "local": 4, + "projection": [] } } } ] }, - "id": 5, - "name": "<() as std::process::Termination>::report" + "name": "std::rt::lang_start::<()>" } }, - "symbol_name": "_ZN54_$LT$$LP$$RP$$u20$as$u20$std..process..Termination$GT$6report17h" + "symbol_name": "_ZN3std2rt10lang_start17h" }, { "details": null, @@ -428,20 +318,17 @@ { "kind": { "StorageLive": 2 - }, - "span": 16 + } }, { "kind": { "StorageLive": 3 - }, - "span": 15 + } }, { "kind": { "StorageLive": 4 - }, - "span": 17 + } }, { "kind": { @@ -459,7 +346,7 @@ { "Field": [ 0, - 7 + 0 ] } ] @@ -467,8 +354,7 @@ } } ] - }, - "span": 17 + } } ], "terminator": { @@ -489,18 +375,15 @@ "func": { "Constant": { "const_": { - "id": 1, "kind": "ZeroSized" }, - "span": 14, "user_ty": null } }, "target": 1, "unwind": "Continue" } - }, - "span": 15 + } } }, { @@ -508,8 +391,7 @@ { "kind": { "StorageDead": 4 - }, - "span": 19 + } } ], "terminator": { @@ -530,18 +412,15 @@ "func": { "Constant": { "const_": { - "id": 2, "kind": "ZeroSized" }, - "span": 18, "user_ty": null } }, "target": 2, "unwind": "Continue" } - }, - "span": 16 + } } }, { @@ -549,14 +428,12 @@ { "kind": { "StorageDead": 3 - }, - "span": 21 + } }, { "kind": { "StorageLive": 5 - }, - "span": 22 + } }, { "kind": { @@ -565,42 +442,6 @@ "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": { @@ -609,13 +450,13 @@ { "Field": [ 0, - 15 + 0 ] }, { "Field": [ 0, - 9 + 0 ] } ] @@ -623,8 +464,7 @@ } } ] - }, - "span": 23 + } }, { "kind": { @@ -638,109 +478,220 @@ "IntToInt", { "Move": { - "local": 6, + "local": 5, "projection": [] } }, - 16 + 0 ] } ] - }, - "span": 24 - }, - { - "kind": { - "StorageDead": 6 - }, - "span": 25 + } }, { "kind": { "StorageDead": 5 - }, - "span": 26 + } }, { "kind": { "StorageDead": 2 - }, - "span": 27 + } } ], "terminator": { - "kind": "Return", - "span": 20 + "kind": "Return" + } + } + ], + "locals": [ + { + "mutability": "Mut" + }, + { + "mutability": "Mut" + }, + { + "mutability": "Mut" + }, + { + "mutability": "Mut" + }, + { + "mutability": "Mut" + }, + { + "mutability": "Mut" + } + ], + "spread_arg": null, + "var_debug_info": [ + { + "argument_index": null, + "composite": null, + "name": "main", + "source_info": { + "scope": 0 + }, + "value": { + "Place": { + "local": 1, + "projection": [ + "Deref", + { + "Field": [ + 0, + 0 + ] + } + ] + } + } + }, + { + "argument_index": 1, + "composite": null, + "name": "self", + "source_info": { + "scope": 1 + }, + "value": { + "Place": { + "local": 2, + "projection": [] + } + } + } + ] + }, + "name": "std::rt::lang_start::<()>::{closure#0}" + } + }, + "symbol_name": "_ZN3std2rt10lang_start28_$u7b$$u7b$closure$u7d$$u7d$17h" + }, + { + "details": null, + "mono_item_kind": { + "MonoItemFn": { + "body": { + "arg_count": 1, + "blocks": [ + { + "statements": [], + "terminator": { + "kind": { + "Call": { + "args": [ + { + "Move": { + "local": 1, + "projection": [] + } + }, + { + "Constant": { + "const_": { + "kind": "ZeroSized" + }, + "user_ty": null + } + } + ], + "destination": { + "local": 0, + "projection": [] + }, + "func": { + "Constant": { + "const_": { + "kind": "ZeroSized" + }, + "user_ty": null + } + }, + "target": 1, + "unwind": "Continue" + } + } + } + }, + { + "statements": [], + "terminator": { + "kind": { + "Call": { + "args": [ + { + "Constant": { + "const_": { + "kind": "ZeroSized" + }, + "user_ty": null + } + } + ], + "destination": { + "local": 2, + "projection": [] + }, + "func": { + "Constant": { + "const_": { + "kind": "ZeroSized" + }, + "user_ty": null + } + }, + "target": 2, + "unwind": "Unreachable" + } + } + } + }, + { + "statements": [], + "terminator": { + "kind": "Return" } } ], "locals": [ { - "mutability": "Mut", - "span": 28 - }, - { - "mutability": "Mut", - "span": 3 - }, - { - "mutability": "Mut", - "span": 16 + "mutability": "Mut" }, { - "mutability": "Mut", - "span": 15 + "mutability": "Not" }, { - "mutability": "Mut", - "span": 17 - }, - { - "mutability": "Mut", - "span": 22 - }, - { - "mutability": "Mut", - "span": 23 + "mutability": "Not" } ], - "span": 3, "spread_arg": null, "var_debug_info": [ { - "argument_index": null, + "argument_index": 1, "composite": null, - "name": "main", + "name": "f", "source_info": { - "scope": 0, - "span": 9 + "scope": 0 }, "value": { "Place": { "local": 1, - "projection": [ - "Deref", - { - "Field": [ - 0, - 7 - ] - } - ] + "projection": [] } } }, { - "argument_index": 1, + "argument_index": null, "composite": null, - "name": "self", + "name": "result", "source_info": { - "scope": 1, - "span": 29 + "scope": 1 }, "value": { "Place": { - "local": 2, + "local": 0, "projection": [] } } @@ -748,25 +699,25 @@ { "argument_index": 1, "composite": null, - "name": "self", + "name": "dummy", "source_info": { - "scope": 2, - "span": 30 + "scope": 2 }, "value": { - "Place": { - "local": 5, - "projection": [] + "Const": { + "const_": { + "kind": "ZeroSized" + }, + "user_ty": null } } } ] }, - "id": 1, - "name": "std::rt::lang_start::<()>::{closure#0}" + "name": "std::sys::backtrace::__rust_begin_short_backtrace::" } }, - "symbol_name": "_ZN3std2rt10lang_start28_$u7b$$u7b$closure$u7d$$u7d$17h" + "symbol_name": "_ZN3std3sys9backtrace28__rust_begin_short_backtrace17h" }, { "details": null, @@ -780,55 +731,65 @@ "terminator": { "kind": { "Call": { - "args": [], + "args": [ + { + "Move": { + "local": 1, + "projection": [ + "Deref" + ] + } + }, + { + "Move": { + "local": 2, + "projection": [] + } + } + ], "destination": { "local": 0, "projection": [] }, "func": { - "Move": { - "local": 1, - "projection": [] + "Constant": { + "const_": { + "kind": "ZeroSized" + }, + "user_ty": null } }, "target": 1, "unwind": "Continue" } - }, - "span": 43 + } } }, { "statements": [], "terminator": { - "kind": "Return", - "span": 43 + "kind": "Return" } } ], "locals": [ { - "mutability": "Mut", - "span": 43 + "mutability": "Mut" }, { - "mutability": "Not", - "span": 43 + "mutability": "Not" }, { - "mutability": "Not", - "span": 43 + "mutability": "Not" } ], - "span": 43, "spread_arg": 2, "var_debug_info": [] }, - "id": 3, - "name": ">::call_once" + "name": "<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once" } }, - "symbol_name": "_ZN4core3ops8function6FnOnce9call_once17h" + "symbol_name": "_ZN4core3ops8function6FnOnce40call_once$u7b$$u7b$vtable.shim$u7d$$u7d$17h" }, { "details": null, @@ -842,74 +803,48 @@ "terminator": { "kind": { "Call": { - "args": [ - { - "Move": { - "local": 1, - "projection": [ - "Deref" - ] - } - }, - { - "Move": { - "local": 2, - "projection": [] - } - } - ], + "args": [], "destination": { "local": 0, "projection": [] }, "func": { - "Constant": { - "const_": { - "id": 6, - "kind": "ZeroSized" - }, - "span": 43, - "user_ty": null + "Move": { + "local": 1, + "projection": [] } }, "target": 1, "unwind": "Continue" } - }, - "span": 43 + } } }, { "statements": [], "terminator": { - "kind": "Return", - "span": 43 + "kind": "Return" } } ], "locals": [ { - "mutability": "Mut", - "span": 43 + "mutability": "Mut" }, { - "mutability": "Not", - "span": 43 + "mutability": "Not" }, { - "mutability": "Not", - "span": 43 + "mutability": "Not" } ], - "span": 43, "spread_arg": 2, "var_debug_info": [] }, - "id": 3, - "name": "<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once" + "name": ">::call_once" } }, - "symbol_name": "_ZN4core3ops8function6FnOnce40call_once$u7b$$u7b$vtable.shim$u7d$$u7d$17h" + "symbol_name": "_ZN4core3ops8function6FnOnce9call_once17h" }, { "details": null, @@ -944,8 +879,7 @@ ] } ] - }, - "span": 43 + } } ], "terminator": { @@ -972,10 +906,8 @@ "func": { "Constant": { "const_": { - "id": 7, "kind": "ZeroSized" }, - "span": 43, "user_ty": null } }, @@ -984,8 +916,7 @@ "Cleanup": 3 } } - }, - "span": 43 + } } }, { @@ -1000,15 +931,13 @@ "target": 2, "unwind": "Continue" } - }, - "span": 43 + } } }, { "statements": [], "terminator": { - "kind": "Return", - "span": 43 + "kind": "Return" } }, { @@ -1023,41 +952,33 @@ "target": 4, "unwind": "Terminate" } - }, - "span": 43 + } } }, { "statements": [], "terminator": { - "kind": "Resume", - "span": 43 + "kind": "Resume" } } ], "locals": [ { - "mutability": "Mut", - "span": 43 + "mutability": "Mut" }, { - "mutability": "Not", - "span": 43 + "mutability": "Not" }, { - "mutability": "Not", - "span": 43 + "mutability": "Not" }, { - "mutability": "Not", - "span": 43 + "mutability": "Not" } ], - "span": 43, "spread_arg": 2, "var_debug_info": [] }, - "id": 3, "name": "<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once" } }, @@ -1068,273 +989,86 @@ "mono_item_kind": { "MonoItemFn": { "body": { - "arg_count": 4, + "arg_count": 1, "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 - } - ], + "statements": [], "terminator": { - "kind": { - "Call": { - "args": [ - { - "Move": { - "local": 6, - "projection": [] - } - }, - { - "Move": { - "local": 2, - "projection": [] - } - }, - { - "Move": { - "local": 3, - "projection": [] - } - }, - { - "Move": { - "local": 4, - "projection": [] - } - } - ], - "destination": { - "local": 5, - "projection": [] - }, - "func": { - "Constant": { - "const_": { - "id": 0, - "kind": "ZeroSized" - }, - "span": 0, - "user_ty": null - } - }, - "target": 1, - "unwind": "Continue" - } - }, - "span": 1 + "kind": "Return" } + } + ], + "locals": [ + { + "mutability": "Mut" }, + { + "mutability": "Not" + } + ], + "spread_arg": null, + "var_debug_info": [] + }, + "name": "std::ptr::drop_in_place::<{closure@std::rt::lang_start<()>::{closure#0}}>" + } + }, + "symbol_name": "_ZN4core3ptr85drop_in_place$LT$std..rt..lang_start$LT$$LP$$RP$$GT$..$u7b$$u7b$closure$u7d$$u7d$$GT$17h" + }, + { + "details": null, + "mono_item_kind": { + "MonoItemFn": { + "body": { + "arg_count": 0, + "blocks": [ { "statements": [ - { - "kind": { - "StorageDead": 6 - }, - "span": 5 - }, { "kind": { "Assign": [ { - "local": 0, + "local": 1, "projection": [] }, { - "Use": { - "Copy": { - "local": 5, - "projection": [ - { - "Downcast": 0 - }, - { - "Field": [ - 0, - 6 - ] - } + "Aggregate": [ + { + "Adt": [ + 0, + 0, + [], + null, + null ] - } - } + }, + [] + ] } ] - }, - "span": 6 - }, - { - "kind": { - "StorageDead": 8 - }, - "span": 7 - }, - { - "kind": { - "StorageDead": 5 - }, - "span": 7 + } } ], "terminator": { - "kind": "Return", - "span": 4 + "kind": "Return" } } ], "locals": [ { - "mutability": "Mut", - "span": 8 - }, - { - "mutability": "Not", - "span": 9 - }, - { - "mutability": "Not", - "span": 10 - }, - { - "mutability": "Not", - "span": 11 + "mutability": "Mut" }, { - "mutability": "Not", - "span": 12 - }, - { - "mutability": "Mut", - "span": 1 - }, - { - "mutability": "Mut", - "span": 2 - }, - { - "mutability": "Not", - "span": 2 - }, - { - "mutability": "Not", - "span": 3 + "mutability": "Not" } ], - "span": 13, "spread_arg": null, "var_debug_info": [ { - "argument_index": 1, + "argument_index": null, "composite": null, - "name": "main", + "name": "a", "source_info": { - "scope": 0, - "span": 9 + "scope": 1 }, "value": { "Place": { @@ -1342,74 +1076,75 @@ "projection": [] } } - }, - { - "argument_index": 2, - "composite": null, - "name": "argc", - "source_info": { - "scope": 0, - "span": 10 - }, - "value": { - "Place": { - "local": 2, - "projection": [] - } - } - }, + } + ] + }, + "name": "main" + } + }, + "symbol_name": "_ZN4enum4main17h" + }, + { + "details": null, + "mono_item_kind": { + "MonoItemFn": { + "body": { + "arg_count": 1, + "blocks": [ { - "argument_index": 3, - "composite": null, - "name": "argv", - "source_info": { - "scope": 0, - "span": 11 - }, - "value": { - "Place": { - "local": 3, - "projection": [] + "statements": [ + { + "kind": { + "Assign": [ + { + "local": 0, + "projection": [] + }, + { + "Use": { + "Constant": { + "const_": { + "kind": { + "Allocated": { + "align": 1, + "bytes": [ + 0 + ], + "mutability": "Mut", + "provenance": { + "ptrs": [] + } + } + } + }, + "user_ty": null + } + } + } + ] + } } + ], + "terminator": { + "kind": "Return" } - }, + } + ], + "locals": [ { - "argument_index": 4, - "composite": null, - "name": "sigpipe", - "source_info": { - "scope": 0, - "span": 12 - }, - "value": { - "Place": { - "local": 4, - "projection": [] - } - } + "mutability": "Mut" }, { - "argument_index": null, - "composite": null, - "name": "v", - "source_info": { - "scope": 1, - "span": 6 - }, - "value": { - "Place": { - "local": 0, - "projection": [] - } - } + "mutability": "Not" } - ] + ], + "spread_arg": null, + "var_debug_info": [] }, - "id": 0, - "name": "std::rt::lang_start::<()>" + "name": "<() as std::process::Termination>::report" } }, - "symbol_name": "_ZN3std2rt10lang_start17h" + "symbol_name": "_ZN54_$LT$$LP$$RP$$u20$as$u20$std..process..Termination$GT$6report17h" } ], "types": [ @@ -1541,54 +1276,6 @@ } } ], - [ - { - "EnumType": { - "discriminants": [ - 0, - 1 - ], - "fields": "elided", - "layout": { - "abi": { - "Scalar": { - "Initialized": { - "valid_range": { - "end": 18446744073709551615, - "start": 0 - }, - "value": { - "Int": { - "length": "I64", - "signed": true - } - } - } - } - }, - "abi_align": 8, - "fields": { - "Arbitrary": { - "offsets": [ - { - "num_bits": 0 - } - ] - } - }, - "size": { - "num_bits": 64 - }, - "variants": { - "Single": { - "index": 0 - } - } - }, - "name": "std::result::Result" - } - } - ], [ { "StructType": { @@ -1733,8 +1420,7 @@ } } }, - "mutability": "Mut", - "pointee_type": "elided" + "mutability": "Mut" } } ], @@ -1766,8 +1452,7 @@ } } }, - "mutability": "Not", - "pointee_type": "elided" + "mutability": "Not" } } ], @@ -1799,41 +1484,7 @@ } } }, - "mutability": "Not", - "pointee_type": "elided" - } - } - ], - [ - { - "RefType": { - "layout": { - "abi": { - "Scalar": { - "Initialized": { - "valid_range": { - "end": 18446744073709551615, - "start": 1 - }, - "value": { - "Pointer": 0 - } - } - } - }, - "abi_align": 8, - "fields": "Primitive", - "size": { - "num_bits": 64 - }, - "variants": { - "Single": { - "index": 0 - } - } - }, - "mutability": "Mut", - "pointee_type": "elided" + "mutability": "Not" } } ], @@ -1865,8 +1516,7 @@ } } }, - "mutability": "Not", - "pointee_type": "elided" + "mutability": "Mut" } } ], @@ -1898,8 +1548,7 @@ } } }, - "mutability": "Not", - "pointee_type": "elided" + "mutability": "Not" } } ], @@ -1955,8 +1604,7 @@ } } }, - "mutability": "Not", - "pointee_type": "elided" + "mutability": "Not" } } ], diff --git a/tests/integration/programs/fibonacci.smir.json.expected b/tests/integration/expected/nightly-2025-03-01/fibonacci.smir.json.expected similarity index 80% rename from tests/integration/programs/fibonacci.smir.json.expected rename to tests/integration/expected/nightly-2025-03-01/fibonacci.smir.json.expected index 38fd6dec..0b4f22c4 100644 --- a/tests/integration/programs/fibonacci.smir.json.expected +++ b/tests/integration/expected/nightly-2025-03-01/fibonacci.smir.json.expected @@ -98,186 +98,207 @@ "mono_item_kind": { "MonoItemFn": { "body": { - "arg_count": 0, + "arg_count": 4, "blocks": [ { - "statements": [], - "terminator": { - "kind": { - "Call": { - "args": [ + "statements": [ + { + "kind": { + "StorageLive": 5 + } + }, + { + "kind": { + "StorageLive": 7 + } + }, + { + "kind": { + "Assign": [ { - "Constant": { - "const_": { - "id": 13, - "kind": { - "Allocated": { - "align": 4, - "bytes": [ - 5, - 0, - 0, - 0 - ], - "mutability": "Mut", - "provenance": { - "ptrs": [] + "local": 7, + "projection": [] + }, + { + "Aggregate": [ + { + "Closure": [ + 0, + [ + { + "Type": 0 + }, + { + "Type": 0 + }, + { + "Type": 0 + }, + { + "Type": 0 } + ] + ] + }, + [ + { + "Copy": { + "local": 1, + "projection": [] } } - }, - "span": 68, - "user_ty": null - } - } - ], - "destination": { - "local": 1, - "projection": [] - }, - "func": { - "Constant": { - "const_": { - "id": 12, - "kind": "ZeroSized" - }, - "span": 67, - "user_ty": null + ] + ] } - }, - "target": 1, - "unwind": "Continue" + ] } }, - "span": 69 - } - }, - { - "statements": [], - "terminator": { - "kind": { - "SwitchInt": { - "discr": { - "Copy": { - "local": 1, + { + "kind": { + "Assign": [ + { + "local": 6, "projection": [] - } - }, - "targets": { - "branches": [ - [ - 5, - 2 + }, + { + "Ref": [ + { + "kind": "ReErased" + }, + "Shared", + { + "local": 7, + "projection": [] + } ] - ], - "otherwise": 3 - } + } + ] } }, - "span": 70 - } - }, - { - "statements": [], - "terminator": { - "kind": "Return", - "span": 71 - } - }, - { - "statements": [], + { + "kind": { + "Assign": [ + { + "local": 5, + "projection": [] + }, + { + "Cast": [ + { + "PointerCoercion": "Unsize" + }, + { + "Copy": { + "local": 6, + "projection": [] + } + }, + 0 + ] + } + ] + } + } + ], "terminator": { "kind": { "Call": { "args": [ { - "Constant": { - "const_": { - "id": 15, - "kind": { - "Allocated": { - "align": 8, - "bytes": [ - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 26, - 0, - 0, - 0, - 0, - 0, - 0, - 0 - ], - "mutability": "Mut", - "provenance": { - "ptrs": [ - [ - 0, - 0 - ] - ] - } - } - } - }, - "span": 32, - "user_ty": null + "Move": { + "local": 5, + "projection": [] + } + }, + { + "Move": { + "local": 2, + "projection": [] + } + }, + { + "Move": { + "local": 3, + "projection": [] + } + }, + { + "Move": { + "local": 4, + "projection": [] } } ], "destination": { - "local": 2, + "local": 0, "projection": [] }, "func": { "Constant": { "const_": { - "id": 14, "kind": "ZeroSized" }, - "span": 72, "user_ty": null } }, - "target": null, + "target": 1, "unwind": "Continue" } + } + } + }, + { + "statements": [ + { + "kind": { + "StorageDead": 5 + } }, - "span": 72 + { + "kind": { + "StorageDead": 7 + } + } + ], + "terminator": { + "kind": "Return" } } ], "locals": [ { - "mutability": "Mut", - "span": 73 + "mutability": "Mut" }, { - "mutability": "Not", - "span": 74 + "mutability": "Not" }, { - "mutability": "Mut", - "span": 72 + "mutability": "Not" + }, + { + "mutability": "Not" + }, + { + "mutability": "Not" + }, + { + "mutability": "Mut" + }, + { + "mutability": "Not" + }, + { + "mutability": "Not" } ], - "span": 75, "spread_arg": null, "var_debug_info": [ { - "argument_index": null, + "argument_index": 1, "composite": null, - "name": "ans", + "name": "main", "source_info": { - "scope": 1, - "span": 74 + "scope": 0 }, "value": { "Place": { @@ -285,49 +306,55 @@ "projection": [] } } - } - ] - }, - "id": 7, - "name": "main" - } - }, - "symbol_name": "_ZN9fibonacci4main17h" - }, - { - "details": null, - "mono_item_kind": { - "MonoItemFn": { - "body": { - "arg_count": 1, - "blocks": [ + }, { - "statements": [], - "terminator": { - "kind": "Return", - "span": 44 + "argument_index": 2, + "composite": null, + "name": "argc", + "source_info": { + "scope": 0 + }, + "value": { + "Place": { + "local": 2, + "projection": [] + } } - } - ], - "locals": [ + }, { - "mutability": "Mut", - "span": 44 + "argument_index": 3, + "composite": null, + "name": "argv", + "source_info": { + "scope": 0 + }, + "value": { + "Place": { + "local": 3, + "projection": [] + } + } }, { - "mutability": "Not", - "span": 44 + "argument_index": 4, + "composite": null, + "name": "sigpipe", + "source_info": { + "scope": 0 + }, + "value": { + "Place": { + "local": 4, + "projection": [] + } + } } - ], - "span": 44, - "spread_arg": null, - "var_debug_info": [] + ] }, - "id": 4, - "name": "std::ptr::drop_in_place::<{closure@std::rt::lang_start<()>::{closure#0}}>" + "name": "std::rt::lang_start::<()>" } }, - "symbol_name": "_ZN4core3ptr85drop_in_place$LT$std..rt..lang_start$LT$$LP$$RP$$GT$..$u7b$$u7b$closure$u7d$$u7d$$GT$17h" + "symbol_name": "_ZN3std2rt10lang_start17h" }, { "details": null, @@ -337,63 +364,94 @@ "arg_count": 1, "blocks": [ { - "statements": [], + "statements": [ + { + "kind": { + "StorageLive": 2 + } + }, + { + "kind": { + "StorageLive": 3 + } + }, + { + "kind": { + "StorageLive": 4 + } + }, + { + "kind": { + "Assign": [ + { + "local": 4, + "projection": [] + }, + { + "Use": { + "Copy": { + "local": 1, + "projection": [ + "Deref", + { + "Field": [ + 0, + 0 + ] + } + ] + } + } + } + ] + } + } + ], "terminator": { "kind": { "Call": { "args": [ { "Move": { - "local": 1, + "local": 4, "projection": [] } - }, - { - "Constant": { - "const_": { - "id": 4, - "kind": "ZeroSized" - }, - "span": 32, - "user_ty": null - } } ], "destination": { - "local": 0, + "local": 3, "projection": [] }, "func": { "Constant": { "const_": { - "id": 3, "kind": "ZeroSized" }, - "span": 31, "user_ty": null } }, "target": 1, "unwind": "Continue" } - }, - "span": 33 + } } }, { - "statements": [], + "statements": [ + { + "kind": { + "StorageDead": 4 + } + } + ], "terminator": { "kind": { "Call": { "args": [ { - "Constant": { - "const_": { - "id": 4, - "kind": "ZeroSized" - }, - "span": 32, - "user_ty": null + "Move": { + "local": 3, + "projection": [] } } ], @@ -404,101 +462,162 @@ "func": { "Constant": { "const_": { - "id": 5, "kind": "ZeroSized" }, - "span": 34, "user_ty": null } }, "target": 2, - "unwind": "Unreachable" + "unwind": "Continue" } - }, - "span": 35 + } } }, { - "statements": [], + "statements": [ + { + "kind": { + "StorageDead": 3 + } + }, + { + "kind": { + "StorageLive": 5 + } + }, + { + "kind": { + "Assign": [ + { + "local": 5, + "projection": [] + }, + { + "Use": { + "Copy": { + "local": 2, + "projection": [ + { + "Field": [ + 0, + 0 + ] + }, + { + "Field": [ + 0, + 0 + ] + } + ] + } + } + } + ] + } + }, + { + "kind": { + "Assign": [ + { + "local": 0, + "projection": [] + }, + { + "Cast": [ + "IntToInt", + { + "Move": { + "local": 5, + "projection": [] + } + }, + 0 + ] + } + ] + } + }, + { + "kind": { + "StorageDead": 5 + } + }, + { + "kind": { + "StorageDead": 2 + } + } + ], "terminator": { - "kind": "Return", - "span": 36 + "kind": "Return" } } ], "locals": [ { - "mutability": "Mut", - "span": 37 + "mutability": "Mut" + }, + { + "mutability": "Mut" + }, + { + "mutability": "Mut" + }, + { + "mutability": "Mut" }, { - "mutability": "Not", - "span": 38 + "mutability": "Mut" }, { - "mutability": "Not", - "span": 39 + "mutability": "Mut" } ], - "span": 42, "spread_arg": null, "var_debug_info": [ { - "argument_index": 1, + "argument_index": null, "composite": null, - "name": "f", + "name": "main", "source_info": { - "scope": 0, - "span": 38 + "scope": 0 }, "value": { "Place": { "local": 1, - "projection": [] + "projection": [ + "Deref", + { + "Field": [ + 0, + 0 + ] + } + ] } } }, { - "argument_index": null, + "argument_index": 1, "composite": null, - "name": "result", + "name": "self", "source_info": { - "scope": 1, - "span": 40 + "scope": 1 }, "value": { "Place": { - "local": 0, + "local": 2, "projection": [] } } - }, - { - "argument_index": 1, - "composite": null, - "name": "dummy", - "source_info": { - "scope": 2, - "span": 41 - }, - "value": { - "Const": { - "const_": { - "id": 4, - "kind": "ZeroSized" - }, - "span": 32, - "user_ty": null - } - } } ] }, - "id": 2, - "name": "std::sys::backtrace::__rust_begin_short_backtrace::" + "name": "std::rt::lang_start::<()>::{closure#0}" } }, - "symbol_name": "_ZN3std3sys9backtrace28__rust_begin_short_backtrace17h" + "symbol_name": "_ZN3std2rt10lang_start28_$u7b$$u7b$closure$u7d$$u7d$17h" }, { "details": null, @@ -509,635 +628,102 @@ "blocks": [ { "statements": [], - "terminator": { - "kind": { - "SwitchInt": { - "discr": { - "Copy": { - "local": 1, - "projection": [] - } - }, - "targets": { - "branches": [ - [ - 0, - 3 - ], - [ - 1, - 2 - ] - ], - "otherwise": 1 - } - } - }, - "span": 50 - } - }, - { - "statements": [ - { - "kind": { - "Assign": [ - { - "local": 4, - "projection": [] - }, - { - "CheckedBinaryOp": [ - "Sub", - { - "Copy": { - "local": 1, - "projection": [] - } - }, - { - "Constant": { - "const_": { - "id": 9, - "kind": { - "Allocated": { - "align": 4, - "bytes": [ - 2, - 0, - 0, - 0 - ], - "mutability": "Mut", - "provenance": { - "ptrs": [] - } - } - } - }, - "span": 51, - "user_ty": null - } - } - ] - } - ] - }, - "span": 52 - } - ], - "terminator": { - "kind": { - "Assert": { - "cond": { - "Move": { - "local": 4, - "projection": [ - { - "Field": [ - 1, - 25 - ] - } - ] - } - }, - "expected": false, - "msg": { - "Overflow": [ - "Sub", - { - "Copy": { - "local": 1, - "projection": [] - } - }, - { - "Constant": { - "const_": { - "id": 9, - "kind": { - "Allocated": { - "align": 4, - "bytes": [ - 2, - 0, - 0, - 0 - ], - "mutability": "Mut", - "provenance": { - "ptrs": [] - } - } - } - }, - "span": 51, - "user_ty": null - } - } - ] - }, - "target": 4, - "unwind": "Continue" - } - }, - "span": 52 - } - }, - { - "statements": [ - { - "kind": { - "Assign": [ - { - "local": 0, - "projection": [] - }, - { - "Use": { - "Constant": { - "const_": { - "id": 10, - "kind": { - "Allocated": { - "align": 4, - "bytes": [ - 1, - 0, - 0, - 0 - ], - "mutability": "Mut", - "provenance": { - "ptrs": [] - } - } - } - }, - "span": 53, - "user_ty": null - } - } - } - ] - }, - "span": 53 - } - ], - "terminator": { - "kind": { - "Goto": { - "target": 9 - } - }, - "span": 53 - } - }, - { - "statements": [ - { - "kind": { - "Assign": [ - { - "local": 0, - "projection": [] - }, - { - "Use": { - "Constant": { - "const_": { - "id": 11, - "kind": { - "Allocated": { - "align": 4, - "bytes": [ - 0, - 0, - 0, - 0 - ], - "mutability": "Mut", - "provenance": { - "ptrs": [] - } - } - } - }, - "span": 54, - "user_ty": null - } - } - } - ] - }, - "span": 54 - } - ], - "terminator": { - "kind": { - "Goto": { - "target": 9 - } - }, - "span": 54 - } - }, - { - "statements": [ - { - "kind": { - "Assign": [ - { - "local": 3, - "projection": [] - }, - { - "Use": { - "Move": { - "local": 4, - "projection": [ - { - "Field": [ - 0, - 26 - ] - } - ] - } - } - } - ] - }, - "span": 52 - } - ], "terminator": { "kind": { "Call": { "args": [ { "Move": { - "local": 3, + "local": 1, "projection": [] } + }, + { + "Constant": { + "const_": { + "kind": "ZeroSized" + }, + "user_ty": null + } } ], "destination": { - "local": 2, + "local": 0, "projection": [] }, "func": { "Constant": { "const_": { - "id": 12, "kind": "ZeroSized" }, - "span": 55, "user_ty": null } }, - "target": 5, + "target": 1, "unwind": "Continue" } - }, - "span": 56 - } - }, - { - "statements": [ - { - "kind": { - "Assign": [ - { - "local": 7, - "projection": [] - }, - { - "CheckedBinaryOp": [ - "Sub", - { - "Copy": { - "local": 1, - "projection": [] - } - }, - { - "Constant": { - "const_": { - "id": 10, - "kind": { - "Allocated": { - "align": 4, - "bytes": [ - 1, - 0, - 0, - 0 - ], - "mutability": "Mut", - "provenance": { - "ptrs": [] - } - } - } - }, - "span": 57, - "user_ty": null - } - } - ] - } - ] - }, - "span": 58 } - ], - "terminator": { - "kind": { - "Assert": { - "cond": { - "Move": { - "local": 7, - "projection": [ - { - "Field": [ - 1, - 25 - ] - } - ] - } - }, - "expected": false, - "msg": { - "Overflow": [ - "Sub", - { - "Copy": { - "local": 1, - "projection": [] - } - }, - { - "Constant": { - "const_": { - "id": 10, - "kind": { - "Allocated": { - "align": 4, - "bytes": [ - 1, - 0, - 0, - 0 - ], - "mutability": "Mut", - "provenance": { - "ptrs": [] - } - } - } - }, - "span": 57, - "user_ty": null - } - } - ] - }, - "target": 6, - "unwind": "Continue" - } - }, - "span": 58 } }, { - "statements": [ - { - "kind": { - "Assign": [ - { - "local": 6, - "projection": [] - }, - { - "Use": { - "Move": { - "local": 7, - "projection": [ - { - "Field": [ - 0, - 26 - ] - } - ] - } - } - } - ] - }, - "span": 58 - } - ], + "statements": [], "terminator": { "kind": { "Call": { "args": [ { - "Move": { - "local": 6, - "projection": [] + "Constant": { + "const_": { + "kind": "ZeroSized" + }, + "user_ty": null } } ], "destination": { - "local": 5, + "local": 2, "projection": [] }, "func": { "Constant": { "const_": { - "id": 12, "kind": "ZeroSized" }, - "span": 59, "user_ty": null } }, - "target": 7, - "unwind": "Continue" - } - }, - "span": 60 - } - }, - { - "statements": [ - { - "kind": { - "Assign": [ - { - "local": 8, - "projection": [] - }, - { - "CheckedBinaryOp": [ - "Add", - { - "Copy": { - "local": 2, - "projection": [] - } - }, - { - "Copy": { - "local": 5, - "projection": [] - } - } - ] - } - ] - }, - "span": 61 - } - ], - "terminator": { - "kind": { - "Assert": { - "cond": { - "Move": { - "local": 8, - "projection": [ - { - "Field": [ - 1, - 25 - ] - } - ] - } - }, - "expected": false, - "msg": { - "Overflow": [ - "Add", - { - "Move": { - "local": 2, - "projection": [] - } - }, - { - "Move": { - "local": 5, - "projection": [] - } - } - ] - }, - "target": 8, - "unwind": "Continue" + "target": 2, + "unwind": "Unreachable" } - }, - "span": 61 - } - }, - { - "statements": [ - { - "kind": { - "Assign": [ - { - "local": 0, - "projection": [] - }, - { - "Use": { - "Move": { - "local": 8, - "projection": [ - { - "Field": [ - 0, - 26 - ] - } - ] - } - } - } - ] - }, - "span": 61 } - ], - "terminator": { - "kind": { - "Goto": { - "target": 9 - } - }, - "span": 62 } }, { "statements": [], "terminator": { - "kind": "Return", - "span": 63 + "kind": "Return" } } ], "locals": [ { - "mutability": "Mut", - "span": 64 - }, - { - "mutability": "Not", - "span": 65 - }, - { - "mutability": "Mut", - "span": 56 - }, - { - "mutability": "Mut", - "span": 52 - }, - { - "mutability": "Mut", - "span": 52 - }, - { - "mutability": "Mut", - "span": 60 + "mutability": "Mut" }, { - "mutability": "Mut", - "span": 58 + "mutability": "Not" }, { - "mutability": "Mut", - "span": 58 - }, - { - "mutability": "Mut", - "span": 61 + "mutability": "Not" } ], - "span": 66, "spread_arg": null, "var_debug_info": [ { "argument_index": 1, "composite": null, - "name": "n", + "name": "f", "source_info": { - "scope": 0, - "span": 65 + "scope": 0 }, "value": { "Place": { @@ -1145,158 +731,205 @@ "projection": [] } } + }, + { + "argument_index": null, + "composite": null, + "name": "result", + "source_info": { + "scope": 1 + }, + "value": { + "Place": { + "local": 0, + "projection": [] + } + } + }, + { + "argument_index": 1, + "composite": null, + "name": "dummy", + "source_info": { + "scope": 2 + }, + "value": { + "Const": { + "const_": { + "kind": "ZeroSized" + }, + "user_ty": null + } + } } ] }, - "id": 6, - "name": "fibonacci" + "name": "std::sys::backtrace::__rust_begin_short_backtrace::" } }, - "symbol_name": "_ZN9fibonacci9fibonacci17h" + "symbol_name": "_ZN3std3sys9backtrace28__rust_begin_short_backtrace17h" }, { "details": null, "mono_item_kind": { "MonoItemFn": { "body": { - "arg_count": 1, + "arg_count": 2, "blocks": [ { - "statements": [ - { - "kind": { - "Assign": [ + "statements": [], + "terminator": { + "kind": { + "Call": { + "args": [ { - "local": 0, - "projection": [] + "Move": { + "local": 1, + "projection": [ + "Deref" + ] + } }, { - "Use": { - "Constant": { - "const_": { - "id": 8, - "kind": { - "Allocated": { - "align": 1, - "bytes": [ - 0 - ], - "mutability": "Mut", - "provenance": { - "ptrs": [] - } - } - } - }, - "span": 46, - "user_ty": null - } + "Move": { + "local": 2, + "projection": [] } } - ] - }, - "span": 46 + ], + "destination": { + "local": 0, + "projection": [] + }, + "func": { + "Constant": { + "const_": { + "kind": "ZeroSized" + }, + "user_ty": null + } + }, + "target": 1, + "unwind": "Continue" + } + } + } + }, + { + "statements": [], + "terminator": { + "kind": "Return" + } + } + ], + "locals": [ + { + "mutability": "Mut" + }, + { + "mutability": "Not" + }, + { + "mutability": "Not" + } + ], + "spread_arg": 2, + "var_debug_info": [] + }, + "name": "<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once" + } + }, + "symbol_name": "_ZN4core3ops8function6FnOnce40call_once$u7b$$u7b$vtable.shim$u7d$$u7d$17h" + }, + { + "details": null, + "mono_item_kind": { + "MonoItemFn": { + "body": { + "arg_count": 2, + "blocks": [ + { + "statements": [], + "terminator": { + "kind": { + "Call": { + "args": [], + "destination": { + "local": 0, + "projection": [] + }, + "func": { + "Move": { + "local": 1, + "projection": [] + } + }, + "target": 1, + "unwind": "Continue" + } } - ], + } + }, + { + "statements": [], "terminator": { - "kind": "Return", - "span": 45 + "kind": "Return" } } ], "locals": [ { - "mutability": "Mut", - "span": 47 + "mutability": "Mut" }, { - "mutability": "Not", - "span": 48 - } - ], - "span": 49, - "spread_arg": null, - "var_debug_info": [ + "mutability": "Not" + }, { - "argument_index": 1, - "composite": null, - "name": "self", - "source_info": { - "scope": 0, - "span": 48 - }, - "value": { - "Const": { - "const_": { - "id": 4, - "kind": "ZeroSized" - }, - "span": 32, - "user_ty": null - } - } + "mutability": "Not" } - ] + ], + "spread_arg": 2, + "var_debug_info": [] }, - "id": 5, - "name": "<() as std::process::Termination>::report" + "name": ">::call_once" } }, - "symbol_name": "_ZN54_$LT$$LP$$RP$$u20$as$u20$std..process..Termination$GT$6report17h" + "symbol_name": "_ZN4core3ops8function6FnOnce9call_once17h" }, { "details": null, "mono_item_kind": { "MonoItemFn": { "body": { - "arg_count": 1, + "arg_count": 2, "blocks": [ { "statements": [ - { - "kind": { - "StorageLive": 2 - }, - "span": 16 - }, - { - "kind": { - "StorageLive": 3 - }, - "span": 15 - }, - { - "kind": { - "StorageLive": 4 - }, - "span": 17 - }, { "kind": { "Assign": [ { - "local": 4, + "local": 3, "projection": [] }, { - "Use": { - "Copy": { + "Ref": [ + { + "kind": "ReErased" + }, + { + "Mut": { + "kind": "Default" + } + }, + { "local": 1, - "projection": [ - "Deref", - { - "Field": [ - 0, - 7 - ] - } - ] + "projection": [] } - } + ] } ] - }, - "span": 17 + } } ], "terminator": { @@ -1305,366 +938,278 @@ "args": [ { "Move": { - "local": 4, + "local": 3, + "projection": [] + } + }, + { + "Move": { + "local": 2, "projection": [] } } ], "destination": { - "local": 3, + "local": 0, "projection": [] }, "func": { "Constant": { "const_": { - "id": 1, "kind": "ZeroSized" }, - "span": 14, "user_ty": null } }, "target": 1, - "unwind": "Continue" + "unwind": { + "Cleanup": 3 + } } - }, - "span": 15 + } } }, { - "statements": [ - { - "kind": { - "StorageDead": 4 - }, - "span": 19 - } - ], + "statements": [], "terminator": { "kind": { - "Call": { - "args": [ - { - "Move": { - "local": 3, - "projection": [] - } - } - ], - "destination": { - "local": 2, + "Drop": { + "place": { + "local": 1, "projection": [] }, - "func": { - "Constant": { - "const_": { - "id": 2, - "kind": "ZeroSized" - }, - "span": 18, - "user_ty": null - } - }, "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 + "statements": [], + "terminator": { + "kind": "Return" + } + }, + { + "statements": [], + "terminator": { + "kind": { + "Drop": { + "place": { + "local": 1, + "projection": [] + }, + "target": 4, + "unwind": "Terminate" + } } - ], + } + }, + { + "statements": [], "terminator": { - "kind": "Return", - "span": 20 + "kind": "Resume" } } ], "locals": [ { - "mutability": "Mut", - "span": 28 + "mutability": "Mut" }, { - "mutability": "Mut", - "span": 3 + "mutability": "Not" }, { - "mutability": "Mut", - "span": 16 + "mutability": "Not" }, { - "mutability": "Mut", - "span": 15 - }, + "mutability": "Not" + } + ], + "spread_arg": 2, + "var_debug_info": [] + }, + "name": "<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once" + } + }, + "symbol_name": "_ZN4core3ops8function6FnOnce9call_once17h" + }, + { + "details": null, + "mono_item_kind": { + "MonoItemFn": { + "body": { + "arg_count": 1, + "blocks": [ { - "mutability": "Mut", - "span": 17 - }, + "statements": [], + "terminator": { + "kind": "Return" + } + } + ], + "locals": [ { - "mutability": "Mut", - "span": 22 + "mutability": "Mut" }, { - "mutability": "Mut", - "span": 23 + "mutability": "Not" } ], - "span": 3, "spread_arg": null, - "var_debug_info": [ + "var_debug_info": [] + }, + "name": "std::ptr::drop_in_place::<{closure@std::rt::lang_start<()>::{closure#0}}>" + } + }, + "symbol_name": "_ZN4core3ptr85drop_in_place$LT$std..rt..lang_start$LT$$LP$$RP$$GT$..$u7b$$u7b$closure$u7d$$u7d$$GT$17h" + }, + { + "details": null, + "mono_item_kind": { + "MonoItemFn": { + "body": { + "arg_count": 1, + "blocks": [ { - "argument_index": null, - "composite": null, - "name": "main", - "source_info": { - "scope": 0, - "span": 9 - }, - "value": { - "Place": { - "local": 1, - "projection": [ - "Deref", - { - "Field": [ - 0, - 7 - ] - } - ] + "statements": [ + { + "kind": { + "Assign": [ + { + "local": 0, + "projection": [] + }, + { + "Use": { + "Constant": { + "const_": { + "kind": { + "Allocated": { + "align": 1, + "bytes": [ + 0 + ], + "mutability": "Mut", + "provenance": { + "ptrs": [] + } + } + } + }, + "user_ty": null + } + } + } + ] + } } + ], + "terminator": { + "kind": "Return" } - }, + } + ], + "locals": [ { - "argument_index": 1, - "composite": null, - "name": "self", - "source_info": { - "scope": 1, - "span": 29 - }, - "value": { - "Place": { - "local": 2, - "projection": [] - } - } + "mutability": "Mut" }, { - "argument_index": 1, - "composite": null, - "name": "self", - "source_info": { - "scope": 2, - "span": 30 - }, - "value": { - "Place": { - "local": 5, - "projection": [] - } - } + "mutability": "Not" } - ] + ], + "spread_arg": null, + "var_debug_info": [] }, - "id": 1, - "name": "std::rt::lang_start::<()>::{closure#0}" + "name": "<() as std::process::Termination>::report" } }, - "symbol_name": "_ZN3std2rt10lang_start28_$u7b$$u7b$closure$u7d$$u7d$17h" + "symbol_name": "_ZN54_$LT$$LP$$RP$$u20$as$u20$std..process..Termination$GT$6report17h" }, { "details": null, "mono_item_kind": { "MonoItemFn": { "body": { - "arg_count": 2, + "arg_count": 0, "blocks": [ { "statements": [], "terminator": { "kind": { "Call": { - "args": [], + "args": [ + { + "Constant": { + "const_": { + "kind": { + "Allocated": { + "align": 4, + "bytes": [ + 5, + 0, + 0, + 0 + ], + "mutability": "Mut", + "provenance": { + "ptrs": [] + } + } + } + }, + "user_ty": null + } + } + ], "destination": { - "local": 0, + "local": 1, "projection": [] }, "func": { - "Move": { - "local": 1, - "projection": [] + "Constant": { + "const_": { + "kind": "ZeroSized" + }, + "user_ty": null } }, "target": 1, "unwind": "Continue" } - }, - "span": 43 + } } }, { "statements": [], "terminator": { - "kind": "Return", - "span": 43 + "kind": { + "SwitchInt": { + "discr": { + "Copy": { + "local": 1, + "projection": [] + } + }, + "targets": { + "branches": [ + [ + 5, + 2 + ] + ], + "otherwise": 3 + } + } + } } - } - ], - "locals": [ - { - "mutability": "Mut", - "span": 43 }, { - "mutability": "Not", - "span": 43 + "statements": [], + "terminator": { + "kind": "Return" + } }, - { - "mutability": "Not", - "span": 43 - } - ], - "span": 43, - "spread_arg": 2, - "var_debug_info": [] - }, - "id": 3, - "name": ">::call_once" - } - }, - "symbol_name": "_ZN4core3ops8function6FnOnce9call_once17h" - }, - { - "details": null, - "mono_item_kind": { - "MonoItemFn": { - "body": { - "arg_count": 2, - "blocks": [ { "statements": [], "terminator": { @@ -1672,108 +1217,351 @@ "Call": { "args": [ { - "Move": { - "local": 1, - "projection": [ - "Deref" - ] - } - }, - { - "Move": { - "local": 2, - "projection": [] + "Constant": { + "const_": { + "kind": { + "Allocated": { + "align": 8, + "bytes": [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 26, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "mutability": "Mut", + "provenance": { + "ptrs": [ + [ + 0, + 0 + ] + ] + } + } + } + }, + "user_ty": null } } ], "destination": { - "local": 0, + "local": 2, "projection": [] }, "func": { "Constant": { "const_": { - "id": 6, "kind": "ZeroSized" }, - "span": 43, "user_ty": null } }, - "target": 1, + "target": null, "unwind": "Continue" } - }, - "span": 43 - } - }, - { - "statements": [], - "terminator": { - "kind": "Return", - "span": 43 + } } } ], "locals": [ { - "mutability": "Mut", - "span": 43 + "mutability": "Mut" }, { - "mutability": "Not", - "span": 43 + "mutability": "Not" }, { - "mutability": "Not", - "span": 43 + "mutability": "Mut" } ], - "span": 43, - "spread_arg": 2, - "var_debug_info": [] + "spread_arg": null, + "var_debug_info": [ + { + "argument_index": null, + "composite": null, + "name": "ans", + "source_info": { + "scope": 1 + }, + "value": { + "Place": { + "local": 1, + "projection": [] + } + } + } + ] }, - "id": 3, - "name": "<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once" + "name": "main" } }, - "symbol_name": "_ZN4core3ops8function6FnOnce40call_once$u7b$$u7b$vtable.shim$u7d$$u7d$17h" + "symbol_name": "_ZN9fibonacci4main17h" }, { "details": null, "mono_item_kind": { "MonoItemFn": { "body": { - "arg_count": 2, + "arg_count": 1, "blocks": [ + { + "statements": [], + "terminator": { + "kind": { + "SwitchInt": { + "discr": { + "Copy": { + "local": 1, + "projection": [] + } + }, + "targets": { + "branches": [ + [ + 0, + 3 + ], + [ + 1, + 2 + ] + ], + "otherwise": 1 + } + } + } + } + }, { "statements": [ { "kind": { "Assign": [ { - "local": 3, + "local": 4, "projection": [] }, { - "Ref": [ + "CheckedBinaryOp": [ + "Sub", { - "kind": "ReErased" + "Copy": { + "local": 1, + "projection": [] + } }, { - "Mut": { - "kind": "Default" + "Constant": { + "const_": { + "kind": { + "Allocated": { + "align": 4, + "bytes": [ + 2, + 0, + 0, + 0 + ], + "mutability": "Mut", + "provenance": { + "ptrs": [] + } + } + } + }, + "user_ty": null } - }, + } + ] + } + ] + } + } + ], + "terminator": { + "kind": { + "Assert": { + "cond": { + "Move": { + "local": 4, + "projection": [ { + "Field": [ + 1, + 0 + ] + } + ] + } + }, + "expected": false, + "msg": { + "Overflow": [ + "Sub", + { + "Copy": { "local": 1, "projection": [] } - ] + }, + { + "Constant": { + "const_": { + "kind": { + "Allocated": { + "align": 4, + "bytes": [ + 2, + 0, + 0, + 0 + ], + "mutability": "Mut", + "provenance": { + "ptrs": [] + } + } + } + }, + "user_ty": null + } + } + ] + }, + "target": 4, + "unwind": "Continue" + } + } + } + }, + { + "statements": [ + { + "kind": { + "Assign": [ + { + "local": 0, + "projection": [] + }, + { + "Use": { + "Constant": { + "const_": { + "kind": { + "Allocated": { + "align": 4, + "bytes": [ + 1, + 0, + 0, + 0 + ], + "mutability": "Mut", + "provenance": { + "ptrs": [] + } + } + } + }, + "user_ty": null + } + } + } + ] + } + } + ], + "terminator": { + "kind": { + "Goto": { + "target": 9 + } + } + } + }, + { + "statements": [ + { + "kind": { + "Assign": [ + { + "local": 0, + "projection": [] + }, + { + "Use": { + "Constant": { + "const_": { + "kind": { + "Allocated": { + "align": 4, + "bytes": [ + 0, + 0, + 0, + 0 + ], + "mutability": "Mut", + "provenance": { + "ptrs": [] + } + } + } + }, + "user_ty": null + } + } + } + ] + } + } + ], + "terminator": { + "kind": { + "Goto": { + "target": 9 + } + } + } + }, + { + "statements": [ + { + "kind": { + "Assign": [ + { + "local": 3, + "projection": [] + }, + { + "Use": { + "Move": { + "local": 4, + "projection": [ + { + "Field": [ + 0, + 0 + ] + } + ] + } + } } ] - }, - "span": 43 + } } ], "terminator": { @@ -1785,204 +1573,130 @@ "local": 3, "projection": [] } - }, - { - "Move": { - "local": 2, - "projection": [] - } } ], "destination": { - "local": 0, + "local": 2, "projection": [] }, "func": { "Constant": { "const_": { - "id": 7, "kind": "ZeroSized" }, - "span": 43, "user_ty": null } }, - "target": 1, - "unwind": { - "Cleanup": 3 - } - } - }, - "span": 43 - } - }, - { - "statements": [], - "terminator": { - "kind": { - "Drop": { - "place": { - "local": 1, - "projection": [] - }, - "target": 2, + "target": 5, "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": [ - { - "mutability": "Mut", - "span": 43 - }, - { - "mutability": "Not", - "span": 43 }, - { - "mutability": "Not", - "span": 43 - }, - { - "mutability": "Not", - "span": 43 - } - ], - "span": 43, - "spread_arg": 2, - "var_debug_info": [] - }, - "id": 3, - "name": "<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once" - } - }, - "symbol_name": "_ZN4core3ops8function6FnOnce9call_once17h" - }, - { - "details": null, - "mono_item_kind": { - "MonoItemFn": { - "body": { - "arg_count": 4, - "blocks": [ { "statements": [ - { - "kind": { - "StorageLive": 5 - }, - "span": 1 - }, - { - "kind": { - "StorageLive": 6 - }, - "span": 2 - }, - { - "kind": { - "StorageLive": 8 - }, - "span": 3 - }, { "kind": { "Assign": [ { - "local": 8, + "local": 7, "projection": [] }, { - "Aggregate": [ + "CheckedBinaryOp": [ + "Sub", { - "Closure": [ - 1, - [ - { - "Type": 1 - }, - { - "Type": 2 - }, - { - "Type": 3 - }, - { - "Type": 4 - } - ] - ] + "Copy": { + "local": 1, + "projection": [] + } }, - [ - { - "Copy": { - "local": 1, - "projection": [] - } + { + "Constant": { + "const_": { + "kind": { + "Allocated": { + "align": 4, + "bytes": [ + 1, + 0, + 0, + 0 + ], + "mutability": "Mut", + "provenance": { + "ptrs": [] + } + } + } + }, + "user_ty": null } - ] + } ] } ] - }, - "span": 3 - }, - { - "kind": { - "Assign": [ - { + } + } + ], + "terminator": { + "kind": { + "Assert": { + "cond": { + "Move": { "local": 7, - "projection": [] - }, - { - "Ref": [ - { - "kind": "ReErased" - }, - "Shared", + "projection": [ { - "local": 8, - "projection": [] + "Field": [ + 1, + 0 + ] } ] } - ] - }, - "span": 2 - }, + }, + "expected": false, + "msg": { + "Overflow": [ + "Sub", + { + "Copy": { + "local": 1, + "projection": [] + } + }, + { + "Constant": { + "const_": { + "kind": { + "Allocated": { + "align": 4, + "bytes": [ + 1, + 0, + 0, + 0 + ], + "mutability": "Mut", + "provenance": { + "ptrs": [] + } + } + } + }, + "user_ty": null + } + } + ] + }, + "target": 6, + "unwind": "Continue" + } + } + } + }, + { + "statements": [ { "kind": { "Assign": [ @@ -1991,22 +1705,22 @@ "projection": [] }, { - "Cast": [ - { - "PointerCoercion": "Unsize" - }, - { - "Copy": { - "local": 7, - "projection": [] - } - }, - 5 - ] + "Use": { + "Move": { + "local": 7, + "projection": [ + { + "Field": [ + 0, + 0 + ] + } + ] + } + } } ] - }, - "span": 2 + } } ], "terminator": { @@ -2018,24 +1732,6 @@ "local": 6, "projection": [] } - }, - { - "Move": { - "local": 2, - "projection": [] - } - }, - { - "Move": { - "local": 3, - "projection": [] - } - }, - { - "Move": { - "local": 4, - "projection": [] - } } ], "destination": { @@ -2045,28 +1741,89 @@ "func": { "Constant": { "const_": { - "id": 0, "kind": "ZeroSized" }, - "span": 0, "user_ty": null } }, - "target": 1, + "target": 7, "unwind": "Continue" } - }, - "span": 1 + } } }, { "statements": [ { "kind": { - "StorageDead": 6 - }, - "span": 5 - }, + "Assign": [ + { + "local": 8, + "projection": [] + }, + { + "CheckedBinaryOp": [ + "Add", + { + "Copy": { + "local": 2, + "projection": [] + } + }, + { + "Copy": { + "local": 5, + "projection": [] + } + } + ] + } + ] + } + } + ], + "terminator": { + "kind": { + "Assert": { + "cond": { + "Move": { + "local": 8, + "projection": [ + { + "Field": [ + 1, + 0 + ] + } + ] + } + }, + "expected": false, + "msg": { + "Overflow": [ + "Add", + { + "Move": { + "local": 2, + "projection": [] + } + }, + { + "Move": { + "local": 5, + "projection": [] + } + } + ] + }, + "target": 8, + "unwind": "Continue" + } + } + } + }, + { + "statements": [ { "kind": { "Assign": [ @@ -2076,16 +1833,13 @@ }, { "Use": { - "Copy": { - "local": 5, + "Move": { + "local": 8, "projection": [ - { - "Downcast": 0 - }, { "Field": [ 0, - 6 + 0 ] } ] @@ -2093,76 +1847,61 @@ } } ] - }, - "span": 6 - }, - { - "kind": { - "StorageDead": 8 - }, - "span": 7 - }, - { - "kind": { - "StorageDead": 5 - }, - "span": 7 + } } ], "terminator": { - "kind": "Return", - "span": 4 + "kind": { + "Goto": { + "target": 9 + } + } + } + }, + { + "statements": [], + "terminator": { + "kind": "Return" } } ], "locals": [ { - "mutability": "Mut", - "span": 8 + "mutability": "Mut" }, { - "mutability": "Not", - "span": 9 + "mutability": "Not" }, { - "mutability": "Not", - "span": 10 + "mutability": "Mut" }, { - "mutability": "Not", - "span": 11 + "mutability": "Mut" }, { - "mutability": "Not", - "span": 12 + "mutability": "Mut" }, { - "mutability": "Mut", - "span": 1 + "mutability": "Mut" }, { - "mutability": "Mut", - "span": 2 + "mutability": "Mut" }, { - "mutability": "Not", - "span": 2 + "mutability": "Mut" }, { - "mutability": "Not", - "span": 3 + "mutability": "Mut" } ], - "span": 13, "spread_arg": null, "var_debug_info": [ { "argument_index": 1, "composite": null, - "name": "main", + "name": "n", "source_info": { - "scope": 0, - "span": 9 + "scope": 0 }, "value": { "Place": { @@ -2170,74 +1909,13 @@ "projection": [] } } - }, - { - "argument_index": 2, - "composite": null, - "name": "argc", - "source_info": { - "scope": 0, - "span": 10 - }, - "value": { - "Place": { - "local": 2, - "projection": [] - } - } - }, - { - "argument_index": 3, - "composite": null, - "name": "argv", - "source_info": { - "scope": 0, - "span": 11 - }, - "value": { - "Place": { - "local": 3, - "projection": [] - } - } - }, - { - "argument_index": 4, - "composite": null, - "name": "sigpipe", - "source_info": { - "scope": 0, - "span": 12 - }, - "value": { - "Place": { - "local": 4, - "projection": [] - } - } - }, - { - "argument_index": null, - "composite": null, - "name": "v", - "source_info": { - "scope": 1, - "span": 6 - }, - "value": { - "Place": { - "local": 0, - "projection": [] - } - } } ] }, - "id": 0, - "name": "std::rt::lang_start::<()>" + "name": "fibonacci" } }, - "symbol_name": "_ZN3std2rt10lang_start17h" + "symbol_name": "_ZN9fibonacci9fibonacci17h" } ], "types": [ @@ -2279,54 +1957,6 @@ } } ], - [ - { - "EnumType": { - "discriminants": [ - 0, - 1 - ], - "fields": "elided", - "layout": { - "abi": { - "Scalar": { - "Initialized": { - "valid_range": { - "end": 18446744073709551615, - "start": 0 - }, - "value": { - "Int": { - "length": "I64", - "signed": true - } - } - } - } - }, - "abi_align": 8, - "fields": { - "Arbitrary": { - "offsets": [ - { - "num_bits": 0 - } - ] - } - }, - "size": { - "num_bits": 64 - }, - "variants": { - "Single": { - "index": 0 - } - } - }, - "name": "std::result::Result" - } - } - ], [ { "StructType": { @@ -2742,39 +2372,6 @@ } } ], - [ - { - "RefType": { - "layout": { - "abi": { - "Scalar": { - "Initialized": { - "valid_range": { - "end": 18446744073709551615, - "start": 1 - }, - "value": { - "Pointer": 0 - } - } - } - }, - "abi_align": 8, - "fields": "Primitive", - "size": { - "num_bits": 64 - }, - "variants": { - "Single": { - "index": 0 - } - } - }, - "mutability": "Not", - "pointee_type": "elided" - } - } - ], [ { "RefType": { diff --git a/tests/integration/programs/float.smir.json.expected b/tests/integration/expected/nightly-2025-03-01/float.smir.json.expected similarity index 80% rename from tests/integration/programs/float.smir.json.expected rename to tests/integration/expected/nightly-2025-03-01/float.smir.json.expected index 69ce1ca2..5bcda3ac 100644 --- a/tests/integration/programs/float.smir.json.expected +++ b/tests/integration/expected/nightly-2025-03-01/float.smir.json.expected @@ -140,867 +140,207 @@ "mono_item_kind": { "MonoItemFn": { "body": { - "arg_count": 0, + "arg_count": 4, "blocks": [ { "statements": [ { "kind": { - "Assign": [ - { - "local": 3, - "projection": [] - }, - { - "Use": { - "Constant": { - "const_": { - "id": 9, - "kind": { - "Allocated": { - "align": 4, - "bytes": [ - 0, - 0, - 96, - 64 - ], - "mutability": "Mut", - "provenance": { - "ptrs": [] - } - } - } - }, - "span": 51, - "user_ty": null - } - } - } - ] - }, - "span": 52 + "StorageLive": 5 + } + }, + { + "kind": { + "StorageLive": 7 + } }, { "kind": { "Assign": [ { - "local": 4, + "local": 7, "projection": [] }, { - "Use": { - "Constant": { - "const_": { - "id": 10, - "kind": { - "Allocated": { - "align": 4, - "bytes": [ - 154, - 153, - 153, - 63 - ], - "mutability": "Mut", - "provenance": { - "ptrs": [] - } + "Aggregate": [ + { + "Closure": [ + 0, + [ + { + "Type": 0 + }, + { + "Type": 0 + }, + { + "Type": 0 + }, + { + "Type": 0 } + ] + ] + }, + [ + { + "Copy": { + "local": 1, + "projection": [] } - }, - "span": 53, - "user_ty": null - } - } + } + ] + ] } ] - }, - "span": 54 + } }, { "kind": { "Assign": [ { - "local": 2, + "local": 6, "projection": [] }, { - "BinaryOp": [ - "Add", + "Ref": [ { - "Move": { - "local": 3, - "projection": [] - } + "kind": "ReErased" }, + "Shared", { - "Move": { - "local": 4, - "projection": [] - } + "local": 7, + "projection": [] } ] } ] - }, - "span": 55 + } }, { "kind": { "Assign": [ { - "local": 1, + "local": 5, "projection": [] }, { - "BinaryOp": [ - "Eq", + "Cast": [ { - "Move": { - "local": 2, - "projection": [] - } + "PointerCoercion": "Unsize" }, { - "Constant": { - "const_": { - "id": 11, - "kind": { - "Allocated": { - "align": 4, - "bytes": [ - 102, - 102, - 150, - 64 - ], - "mutability": "Mut", - "provenance": { - "ptrs": [] - } - } - } - }, - "span": 56, - "user_ty": null + "Copy": { + "local": 6, + "projection": [] } - } + }, + 0 ] } ] - }, - "span": 50 + } } ], "terminator": { "kind": { - "SwitchInt": { - "discr": { - "Move": { - "local": 1, - "projection": [] + "Call": { + "args": [ + { + "Move": { + "local": 5, + "projection": [] + } + }, + { + "Move": { + "local": 2, + "projection": [] + } + }, + { + "Move": { + "local": 3, + "projection": [] + } + }, + { + "Move": { + "local": 4, + "projection": [] + } } + ], + "destination": { + "local": 0, + "projection": [] }, - "targets": { - "branches": [ - [ - 0, - 2 - ] - ], - "otherwise": 1 - } + "func": { + "Constant": { + "const_": { + "kind": "ZeroSized" + }, + "user_ty": null + } + }, + "target": 1, + "unwind": "Continue" } - }, - "span": 50 + } } }, { "statements": [ { "kind": { - "Assign": [ - { - "local": 8, - "projection": [] - }, - { - "Use": { - "Constant": { - "const_": { - "id": 12, - "kind": { - "Allocated": { - "align": 8, - "bytes": [ - 0, - 0, - 0, - 0, - 0, - 0, - 12, - 64 - ], - "mutability": "Mut", - "provenance": { - "ptrs": [] - } - } - } - }, - "span": 58, - "user_ty": null - } - } - } - ] - }, - "span": 59 + "StorageDead": 5 + } }, { "kind": { - "Assign": [ - { - "local": 9, - "projection": [] - }, - { - "Use": { - "Constant": { - "const_": { - "id": 13, - "kind": { - "Allocated": { - "align": 8, - "bytes": [ - 51, - 51, - 51, - 51, - 51, - 51, - 243, - 63 - ], - "mutability": "Mut", - "provenance": { - "ptrs": [] - } - } - } - }, - "span": 60, - "user_ty": null - } - } - } - ] - }, - "span": 61 - }, - { - "kind": { - "Assign": [ - { - "local": 7, - "projection": [] - }, - { - "BinaryOp": [ - "Add", - { - "Move": { - "local": 8, - "projection": [] - } - }, - { - "Move": { - "local": 9, - "projection": [] - } - } - ] - } - ] - }, - "span": 62 - }, - { - "kind": { - "Assign": [ - { - "local": 6, - "projection": [] - }, - { - "BinaryOp": [ - "Eq", - { - "Move": { - "local": 7, - "projection": [] - } - }, - { - "Constant": { - "const_": { - "id": 14, - "kind": { - "Allocated": { - "align": 8, - "bytes": [ - 205, - 204, - 204, - 204, - 204, - 204, - 18, - 64 - ], - "mutability": "Mut", - "provenance": { - "ptrs": [] - } - } - } - }, - "span": 63, - "user_ty": null - } - } - ] - } - ] - }, - "span": 57 - } - ], - "terminator": { - "kind": { - "SwitchInt": { - "discr": { - "Move": { - "local": 6, - "projection": [] - } - }, - "targets": { - "branches": [ - [ - 0, - 4 - ] - ], - "otherwise": 3 - } - } - }, - "span": 57 - } - }, - { - "statements": [], - "terminator": { - "kind": { - "Call": { - "args": [ - { - "Constant": { - "const_": { - "id": 16, - "kind": { - "Allocated": { - "align": 8, - "bytes": [ - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 30, - 0, - 0, - 0, - 0, - 0, - 0, - 0 - ], - "mutability": "Mut", - "provenance": { - "ptrs": [ - [ - 0, - 0 - ] - ] - } - } - } - }, - "span": 32, - "user_ty": null - } - } - ], - "destination": { - "local": 5, - "projection": [] - }, - "func": { - "Constant": { - "const_": { - "id": 15, - "kind": "ZeroSized" - }, - "span": 64, - "user_ty": null - } - }, - "target": null, - "unwind": "Continue" - } - }, - "span": 64 - } - }, - { - "statements": [], - "terminator": { - "kind": "Return", - "span": 65 - } - }, - { - "statements": [], - "terminator": { - "kind": { - "Call": { - "args": [ - { - "Constant": { - "const_": { - "id": 17, - "kind": { - "Allocated": { - "align": 8, - "bytes": [ - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 30, - 0, - 0, - 0, - 0, - 0, - 0, - 0 - ], - "mutability": "Mut", - "provenance": { - "ptrs": [ - [ - 0, - 1 - ] - ] - } - } - } - }, - "span": 32, - "user_ty": null - } - } - ], - "destination": { - "local": 10, - "projection": [] - }, - "func": { - "Constant": { - "const_": { - "id": 15, - "kind": "ZeroSized" - }, - "span": 66, - "user_ty": null - } - }, - "target": null, - "unwind": "Continue" - } - }, - "span": 66 - } - } - ], - "locals": [ - { - "mutability": "Mut", - "span": 67 - }, - { - "mutability": "Mut", - "span": 50 - }, - { - "mutability": "Mut", - "span": 55 - }, - { - "mutability": "Mut", - "span": 52 - }, - { - "mutability": "Mut", - "span": 54 - }, - { - "mutability": "Mut", - "span": 64 - }, - { - "mutability": "Mut", - "span": 57 - }, - { - "mutability": "Mut", - "span": 62 - }, - { - "mutability": "Mut", - "span": 59 - }, - { - "mutability": "Mut", - "span": 61 - }, - { - "mutability": "Mut", - "span": 66 - } - ], - "span": 72, - "spread_arg": null, - "var_debug_info": [ - { - "argument_index": null, - "composite": null, - "name": "a", - "source_info": { - "scope": 1, - "span": 68 - }, - "value": { - "Const": { - "const_": { - "id": 9, - "kind": { - "Allocated": { - "align": 4, - "bytes": [ - 0, - 0, - 96, - 64 - ], - "mutability": "Mut", - "provenance": { - "ptrs": [] - } - } - } - }, - "span": 51, - "user_ty": null - } - } - }, - { - "argument_index": null, - "composite": null, - "name": "b", - "source_info": { - "scope": 2, - "span": 69 - }, - "value": { - "Const": { - "const_": { - "id": 10, - "kind": { - "Allocated": { - "align": 4, - "bytes": [ - 154, - 153, - 153, - 63 - ], - "mutability": "Mut", - "provenance": { - "ptrs": [] - } - } - } - }, - "span": 53, - "user_ty": null - } - } - }, - { - "argument_index": null, - "composite": null, - "name": "c", - "source_info": { - "scope": 3, - "span": 70 - }, - "value": { - "Const": { - "const_": { - "id": 12, - "kind": { - "Allocated": { - "align": 8, - "bytes": [ - 0, - 0, - 0, - 0, - 0, - 0, - 12, - 64 - ], - "mutability": "Mut", - "provenance": { - "ptrs": [] - } - } - } - }, - "span": 58, - "user_ty": null - } - } - }, - { - "argument_index": null, - "composite": null, - "name": "d", - "source_info": { - "scope": 4, - "span": 71 - }, - "value": { - "Const": { - "const_": { - "id": 13, - "kind": { - "Allocated": { - "align": 8, - "bytes": [ - 51, - 51, - 51, - 51, - 51, - 51, - 243, - 63 - ], - "mutability": "Mut", - "provenance": { - "ptrs": [] - } - } - } - }, - "span": 60, - "user_ty": null - } - } - } - ] - }, - "id": 6, - "name": "main" - } - }, - "symbol_name": "_ZN5float4main17h" - }, - { - "details": null, - "mono_item_kind": { - "MonoItemFn": { - "body": { - "arg_count": 1, - "blocks": [ - { - "statements": [], - "terminator": { - "kind": "Return", - "span": 44 - } - } - ], - "locals": [ - { - "mutability": "Mut", - "span": 44 - }, - { - "mutability": "Not", - "span": 44 - } - ], - "span": 44, - "spread_arg": null, - "var_debug_info": [] - }, - "id": 4, - "name": "std::ptr::drop_in_place::<{closure@std::rt::lang_start<()>::{closure#0}}>" - } - }, - "symbol_name": "_ZN4core3ptr85drop_in_place$LT$std..rt..lang_start$LT$$LP$$RP$$GT$..$u7b$$u7b$closure$u7d$$u7d$$GT$17h" - }, - { - "details": null, - "mono_item_kind": { - "MonoItemFn": { - "body": { - "arg_count": 1, - "blocks": [ - { - "statements": [], - "terminator": { - "kind": { - "Call": { - "args": [ - { - "Move": { - "local": 1, - "projection": [] - } - }, - { - "Constant": { - "const_": { - "id": 4, - "kind": "ZeroSized" - }, - "span": 32, - "user_ty": null - } - } - ], - "destination": { - "local": 0, - "projection": [] - }, - "func": { - "Constant": { - "const_": { - "id": 3, - "kind": "ZeroSized" - }, - "span": 31, - "user_ty": null - } - }, - "target": 1, - "unwind": "Continue" - } - }, - "span": 33 - } - }, - { - "statements": [], - "terminator": { - "kind": { - "Call": { - "args": [ - { - "Constant": { - "const_": { - "id": 4, - "kind": "ZeroSized" - }, - "span": 32, - "user_ty": null - } - } - ], - "destination": { - "local": 2, - "projection": [] - }, - "func": { - "Constant": { - "const_": { - "id": 5, - "kind": "ZeroSized" - }, - "span": 34, - "user_ty": null - } - }, - "target": 2, - "unwind": "Unreachable" + "StorageDead": 7 } - }, - "span": 35 - } - }, - { - "statements": [], + } + ], "terminator": { - "kind": "Return", - "span": 36 + "kind": "Return" } } ], "locals": [ { - "mutability": "Mut", - "span": 37 + "mutability": "Mut" + }, + { + "mutability": "Not" + }, + { + "mutability": "Not" + }, + { + "mutability": "Not" }, { - "mutability": "Not", - "span": 38 + "mutability": "Not" }, { - "mutability": "Not", - "span": 39 + "mutability": "Mut" + }, + { + "mutability": "Not" + }, + { + "mutability": "Not" } ], - "span": 42, "spread_arg": null, "var_debug_info": [ { "argument_index": 1, "composite": null, - "name": "f", + "name": "main", "source_info": { - "scope": 0, - "span": 38 + "scope": 0 }, "value": { "Place": { @@ -1010,136 +350,53 @@ } }, { - "argument_index": null, + "argument_index": 2, "composite": null, - "name": "result", + "name": "argc", "source_info": { - "scope": 1, - "span": 40 + "scope": 0 }, "value": { "Place": { - "local": 0, + "local": 2, "projection": [] } } }, { - "argument_index": 1, + "argument_index": 3, "composite": null, - "name": "dummy", + "name": "argv", "source_info": { - "scope": 2, - "span": 41 + "scope": 0 }, "value": { - "Const": { - "const_": { - "id": 4, - "kind": "ZeroSized" - }, - "span": 32, - "user_ty": null - } - } - } - ] - }, - "id": 2, - "name": "std::sys::backtrace::__rust_begin_short_backtrace::" - } - }, - "symbol_name": "_ZN3std3sys9backtrace28__rust_begin_short_backtrace17h" - }, - { - "details": null, - "mono_item_kind": { - "MonoItemFn": { - "body": { - "arg_count": 1, - "blocks": [ - { - "statements": [ - { - "kind": { - "Assign": [ - { - "local": 0, - "projection": [] - }, - { - "Use": { - "Constant": { - "const_": { - "id": 8, - "kind": { - "Allocated": { - "align": 1, - "bytes": [ - 0 - ], - "mutability": "Mut", - "provenance": { - "ptrs": [] - } - } - } - }, - "span": 46, - "user_ty": null - } - } - } - ] - }, - "span": 46 + "Place": { + "local": 3, + "projection": [] } - ], - "terminator": { - "kind": "Return", - "span": 45 } - } - ], - "locals": [ - { - "mutability": "Mut", - "span": 47 }, { - "mutability": "Not", - "span": 48 - } - ], - "span": 49, - "spread_arg": null, - "var_debug_info": [ - { - "argument_index": 1, + "argument_index": 4, "composite": null, - "name": "self", + "name": "sigpipe", "source_info": { - "scope": 0, - "span": 48 + "scope": 0 }, "value": { - "Const": { - "const_": { - "id": 4, - "kind": "ZeroSized" - }, - "span": 32, - "user_ty": null + "Place": { + "local": 4, + "projection": [] } } } ] }, - "id": 5, - "name": "<() as std::process::Termination>::report" + "name": "std::rt::lang_start::<()>" } }, - "symbol_name": "_ZN54_$LT$$LP$$RP$$u20$as$u20$std..process..Termination$GT$6report17h" + "symbol_name": "_ZN3std2rt10lang_start17h" }, { "details": null, @@ -1153,20 +410,17 @@ { "kind": { "StorageLive": 2 - }, - "span": 16 + } }, { "kind": { "StorageLive": 3 - }, - "span": 15 + } }, { "kind": { "StorageLive": 4 - }, - "span": 17 + } }, { "kind": { @@ -1184,7 +438,7 @@ { "Field": [ 0, - 7 + 0 ] } ] @@ -1192,8 +446,7 @@ } } ] - }, - "span": 17 + } } ], "terminator": { @@ -1214,18 +467,15 @@ "func": { "Constant": { "const_": { - "id": 1, "kind": "ZeroSized" }, - "span": 14, "user_ty": null } }, "target": 1, "unwind": "Continue" } - }, - "span": 15 + } } }, { @@ -1233,8 +483,7 @@ { "kind": { "StorageDead": 4 - }, - "span": 19 + } } ], "terminator": { @@ -1247,83 +496,42 @@ "projection": [] } } - ], - "destination": { - "local": 2, - "projection": [] - }, - "func": { - "Constant": { - "const_": { - "id": 2, - "kind": "ZeroSized" - }, - "span": 18, - "user_ty": null - } - }, - "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 - ] - } - ] - } - ] + ], + "destination": { + "local": 2, + "projection": [] + }, + "func": { + "Constant": { + "const_": { + "kind": "ZeroSized" + }, + "user_ty": null } - ] - }, - "span": 22 + }, + "target": 2, + "unwind": "Continue" + } + } + } + }, + { + "statements": [ + { + "kind": { + "StorageDead": 3 + } }, { "kind": { - "StorageLive": 6 - }, - "span": 23 + "StorageLive": 5 + } }, { "kind": { "Assign": [ { - "local": 6, + "local": 5, "projection": [] }, { @@ -1334,13 +542,13 @@ { "Field": [ 0, - 15 + 0 ] }, { "Field": [ 0, - 9 + 0 ] } ] @@ -1348,8 +556,7 @@ } } ] - }, - "span": 23 + } }, { "kind": { @@ -1363,73 +570,52 @@ "IntToInt", { "Move": { - "local": 6, + "local": 5, "projection": [] } }, - 16 + 0 ] } ] - }, - "span": 24 - }, - { - "kind": { - "StorageDead": 6 - }, - "span": 25 + } }, { "kind": { "StorageDead": 5 - }, - "span": 26 + } }, { "kind": { "StorageDead": 2 - }, - "span": 27 + } } ], "terminator": { - "kind": "Return", - "span": 20 + "kind": "Return" } } ], "locals": [ { - "mutability": "Mut", - "span": 28 - }, - { - "mutability": "Mut", - "span": 3 + "mutability": "Mut" }, { - "mutability": "Mut", - "span": 16 + "mutability": "Mut" }, { - "mutability": "Mut", - "span": 15 + "mutability": "Mut" }, { - "mutability": "Mut", - "span": 17 + "mutability": "Mut" }, { - "mutability": "Mut", - "span": 22 + "mutability": "Mut" }, { - "mutability": "Mut", - "span": 23 + "mutability": "Mut" } ], - "span": 3, "spread_arg": null, "var_debug_info": [ { @@ -1437,8 +623,7 @@ "composite": null, "name": "main", "source_info": { - "scope": 0, - "span": 9 + "scope": 0 }, "value": { "Place": { @@ -1448,7 +633,7 @@ { "Field": [ 0, - 7 + 0 ] } ] @@ -1460,8 +645,7 @@ "composite": null, "name": "self", "source_info": { - "scope": 1, - "span": 29 + "scope": 1 }, "value": { "Place": { @@ -1469,25 +653,9 @@ "projection": [] } } - }, - { - "argument_index": 1, - "composite": null, - "name": "self", - "source_info": { - "scope": 2, - "span": 30 - }, - "value": { - "Place": { - "local": 5, - "projection": [] - } - } } ] }, - "id": 1, "name": "std::rt::lang_start::<()>::{closure#0}" } }, @@ -1498,62 +666,150 @@ "mono_item_kind": { "MonoItemFn": { "body": { - "arg_count": 2, + "arg_count": 1, "blocks": [ { "statements": [], "terminator": { "kind": { "Call": { - "args": [], + "args": [ + { + "Move": { + "local": 1, + "projection": [] + } + }, + { + "Constant": { + "const_": { + "kind": "ZeroSized" + }, + "user_ty": null + } + } + ], "destination": { "local": 0, "projection": [] }, "func": { - "Move": { - "local": 1, - "projection": [] + "Constant": { + "const_": { + "kind": "ZeroSized" + }, + "user_ty": null } }, "target": 1, "unwind": "Continue" } - }, - "span": 43 + } + } + }, + { + "statements": [], + "terminator": { + "kind": { + "Call": { + "args": [ + { + "Constant": { + "const_": { + "kind": "ZeroSized" + }, + "user_ty": null + } + } + ], + "destination": { + "local": 2, + "projection": [] + }, + "func": { + "Constant": { + "const_": { + "kind": "ZeroSized" + }, + "user_ty": null + } + }, + "target": 2, + "unwind": "Unreachable" + } + } } }, { "statements": [], "terminator": { - "kind": "Return", - "span": 43 + "kind": "Return" } } ], "locals": [ { - "mutability": "Mut", - "span": 43 + "mutability": "Mut" }, { - "mutability": "Not", - "span": 43 + "mutability": "Not" }, { - "mutability": "Not", - "span": 43 + "mutability": "Not" } ], - "span": 43, - "spread_arg": 2, - "var_debug_info": [] + "spread_arg": null, + "var_debug_info": [ + { + "argument_index": 1, + "composite": null, + "name": "f", + "source_info": { + "scope": 0 + }, + "value": { + "Place": { + "local": 1, + "projection": [] + } + } + }, + { + "argument_index": null, + "composite": null, + "name": "result", + "source_info": { + "scope": 1 + }, + "value": { + "Place": { + "local": 0, + "projection": [] + } + } + }, + { + "argument_index": 1, + "composite": null, + "name": "dummy", + "source_info": { + "scope": 2 + }, + "value": { + "Const": { + "const_": { + "kind": "ZeroSized" + }, + "user_ty": null + } + } + } + ] }, - "id": 3, - "name": ">::call_once" + "name": "std::sys::backtrace::__rust_begin_short_backtrace::" } }, - "symbol_name": "_ZN4core3ops8function6FnOnce9call_once17h" + "symbol_name": "_ZN3std3sys9backtrace28__rust_begin_short_backtrace17h" }, { "details": null, @@ -1590,52 +846,98 @@ "func": { "Constant": { "const_": { - "id": 6, "kind": "ZeroSized" }, - "span": 43, "user_ty": null } }, "target": 1, "unwind": "Continue" } - }, - "span": 43 + } } }, { "statements": [], "terminator": { - "kind": "Return", - "span": 43 + "kind": "Return" } } ], "locals": [ { - "mutability": "Mut", - "span": 43 + "mutability": "Mut" }, { - "mutability": "Not", - "span": 43 + "mutability": "Not" }, { - "mutability": "Not", - "span": 43 + "mutability": "Not" } ], - "span": 43, "spread_arg": 2, "var_debug_info": [] }, - "id": 3, "name": "<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once" } }, "symbol_name": "_ZN4core3ops8function6FnOnce40call_once$u7b$$u7b$vtable.shim$u7d$$u7d$17h" }, + { + "details": null, + "mono_item_kind": { + "MonoItemFn": { + "body": { + "arg_count": 2, + "blocks": [ + { + "statements": [], + "terminator": { + "kind": { + "Call": { + "args": [], + "destination": { + "local": 0, + "projection": [] + }, + "func": { + "Move": { + "local": 1, + "projection": [] + } + }, + "target": 1, + "unwind": "Continue" + } + } + } + }, + { + "statements": [], + "terminator": { + "kind": "Return" + } + } + ], + "locals": [ + { + "mutability": "Mut" + }, + { + "mutability": "Not" + }, + { + "mutability": "Not" + } + ], + "spread_arg": 2, + "var_debug_info": [] + }, + "name": ">::call_once" + } + }, + "symbol_name": "_ZN4core3ops8function6FnOnce9call_once17h" + }, { "details": null, "mono_item_kind": { @@ -1669,8 +971,7 @@ ] } ] - }, - "span": 43 + } } ], "terminator": { @@ -1697,10 +998,8 @@ "func": { "Constant": { "const_": { - "id": 7, "kind": "ZeroSized" }, - "span": 43, "user_ty": null } }, @@ -1709,8 +1008,7 @@ "Cleanup": 3 } } - }, - "span": 43 + } } }, { @@ -1725,15 +1023,13 @@ "target": 2, "unwind": "Continue" } - }, - "span": 43 + } } }, { "statements": [], "terminator": { - "kind": "Return", - "span": 43 + "kind": "Return" } }, { @@ -1748,114 +1044,377 @@ "target": 4, "unwind": "Terminate" } - }, - "span": 43 + } + } + }, + { + "statements": [], + "terminator": { + "kind": "Resume" } + } + ], + "locals": [ + { + "mutability": "Mut" + }, + { + "mutability": "Not" }, + { + "mutability": "Not" + }, + { + "mutability": "Not" + } + ], + "spread_arg": 2, + "var_debug_info": [] + }, + "name": "<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once" + } + }, + "symbol_name": "_ZN4core3ops8function6FnOnce9call_once17h" + }, + { + "details": null, + "mono_item_kind": { + "MonoItemFn": { + "body": { + "arg_count": 1, + "blocks": [ { "statements": [], "terminator": { - "kind": "Resume", - "span": 43 + "kind": "Return" } } ], "locals": [ { - "mutability": "Mut", - "span": 43 + "mutability": "Mut" }, { - "mutability": "Not", - "span": 43 - }, + "mutability": "Not" + } + ], + "spread_arg": null, + "var_debug_info": [] + }, + "name": "std::ptr::drop_in_place::<{closure@std::rt::lang_start<()>::{closure#0}}>" + } + }, + "symbol_name": "_ZN4core3ptr85drop_in_place$LT$std..rt..lang_start$LT$$LP$$RP$$GT$..$u7b$$u7b$closure$u7d$$u7d$$GT$17h" + }, + { + "details": null, + "mono_item_kind": { + "MonoItemFn": { + "body": { + "arg_count": 1, + "blocks": [ + { + "statements": [ + { + "kind": { + "Assign": [ + { + "local": 0, + "projection": [] + }, + { + "Use": { + "Constant": { + "const_": { + "kind": { + "Allocated": { + "align": 1, + "bytes": [ + 0 + ], + "mutability": "Mut", + "provenance": { + "ptrs": [] + } + } + } + }, + "user_ty": null + } + } + } + ] + } + } + ], + "terminator": { + "kind": "Return" + } + } + ], + "locals": [ { - "mutability": "Not", - "span": 43 + "mutability": "Mut" }, { - "mutability": "Not", - "span": 43 + "mutability": "Not" } ], - "span": 43, - "spread_arg": 2, + "spread_arg": null, "var_debug_info": [] }, - "id": 3, - "name": "<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once" + "name": "<() as std::process::Termination>::report" } }, - "symbol_name": "_ZN4core3ops8function6FnOnce9call_once17h" + "symbol_name": "_ZN54_$LT$$LP$$RP$$u20$as$u20$std..process..Termination$GT$6report17h" }, { "details": null, "mono_item_kind": { "MonoItemFn": { "body": { - "arg_count": 4, + "arg_count": 0, "blocks": [ { "statements": [ { "kind": { - "StorageLive": 5 - }, - "span": 1 + "Assign": [ + { + "local": 3, + "projection": [] + }, + { + "Use": { + "Constant": { + "const_": { + "kind": { + "Allocated": { + "align": 4, + "bytes": [ + 0, + 0, + 96, + 64 + ], + "mutability": "Mut", + "provenance": { + "ptrs": [] + } + } + } + }, + "user_ty": null + } + } + } + ] + } }, { "kind": { - "StorageLive": 6 - }, - "span": 2 + "Assign": [ + { + "local": 4, + "projection": [] + }, + { + "Use": { + "Constant": { + "const_": { + "kind": { + "Allocated": { + "align": 4, + "bytes": [ + 154, + 153, + 153, + 63 + ], + "mutability": "Mut", + "provenance": { + "ptrs": [] + } + } + } + }, + "user_ty": null + } + } + } + ] + } }, { "kind": { - "StorageLive": 8 - }, - "span": 3 + "Assign": [ + { + "local": 2, + "projection": [] + }, + { + "BinaryOp": [ + "Add", + { + "Move": { + "local": 3, + "projection": [] + } + }, + { + "Move": { + "local": 4, + "projection": [] + } + } + ] + } + ] + } + }, + { + "kind": { + "Assign": [ + { + "local": 1, + "projection": [] + }, + { + "BinaryOp": [ + "Eq", + { + "Move": { + "local": 2, + "projection": [] + } + }, + { + "Constant": { + "const_": { + "kind": { + "Allocated": { + "align": 4, + "bytes": [ + 102, + 102, + 150, + 64 + ], + "mutability": "Mut", + "provenance": { + "ptrs": [] + } + } + } + }, + "user_ty": null + } + } + ] + } + ] + } + } + ], + "terminator": { + "kind": { + "SwitchInt": { + "discr": { + "Move": { + "local": 1, + "projection": [] + } + }, + "targets": { + "branches": [ + [ + 0, + 2 + ] + ], + "otherwise": 1 + } + } + } + } + }, + { + "statements": [ + { + "kind": { + "Assign": [ + { + "local": 8, + "projection": [] + }, + { + "Use": { + "Constant": { + "const_": { + "kind": { + "Allocated": { + "align": 8, + "bytes": [ + 0, + 0, + 0, + 0, + 0, + 0, + 12, + 64 + ], + "mutability": "Mut", + "provenance": { + "ptrs": [] + } + } + } + }, + "user_ty": null + } + } + } + ] + } }, { "kind": { "Assign": [ { - "local": 8, + "local": 9, "projection": [] }, { - "Aggregate": [ - { - "Closure": [ - 1, - [ - { - "Type": 1 - }, - { - "Type": 2 - }, - { - "Type": 3 - }, - { - "Type": 4 + "Use": { + "Constant": { + "const_": { + "kind": { + "Allocated": { + "align": 8, + "bytes": [ + 51, + 51, + 51, + 51, + 51, + 51, + 243, + 63 + ], + "mutability": "Mut", + "provenance": { + "ptrs": [] + } } - ] - ] - }, - [ - { - "Copy": { - "local": 1, - "projection": [] } - } - ] - ] + }, + "user_ty": null + } + } } ] - }, - "span": 3 + } }, { "kind": { @@ -1865,20 +1424,24 @@ "projection": [] }, { - "Ref": [ + "BinaryOp": [ + "Add", { - "kind": "ReErased" + "Move": { + "local": 8, + "projection": [] + } }, - "Shared", { - "local": 8, - "projection": [] + "Move": { + "local": 9, + "projection": [] + } } ] } ] - }, - "span": 2 + } }, { "kind": { @@ -1888,253 +1451,374 @@ "projection": [] }, { - "Cast": [ - { - "PointerCoercion": "Unsize" - }, + "BinaryOp": [ + "Eq", { - "Copy": { + "Move": { "local": 7, "projection": [] } }, - 5 + { + "Constant": { + "const_": { + "kind": { + "Allocated": { + "align": 8, + "bytes": [ + 205, + 204, + 204, + 204, + 204, + 204, + 18, + 64 + ], + "mutability": "Mut", + "provenance": { + "ptrs": [] + } + } + } + }, + "user_ty": null + } + } ] } ] - }, - "span": 2 + } } ], + "terminator": { + "kind": { + "SwitchInt": { + "discr": { + "Move": { + "local": 6, + "projection": [] + } + }, + "targets": { + "branches": [ + [ + 0, + 4 + ] + ], + "otherwise": 3 + } + } + } + } + }, + { + "statements": [], "terminator": { "kind": { "Call": { "args": [ { - "Move": { - "local": 6, - "projection": [] - } - }, - { - "Move": { - "local": 2, - "projection": [] - } - }, - { - "Move": { - "local": 3, - "projection": [] + "Constant": { + "const_": { + "kind": { + "Allocated": { + "align": 8, + "bytes": [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 30, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "mutability": "Mut", + "provenance": { + "ptrs": [ + [ + 0, + 0 + ] + ] + } + } + } + }, + "user_ty": null } - }, + } + ], + "destination": { + "local": 5, + "projection": [] + }, + "func": { + "Constant": { + "const_": { + "kind": "ZeroSized" + }, + "user_ty": null + } + }, + "target": null, + "unwind": "Continue" + } + } + } + }, + { + "statements": [], + "terminator": { + "kind": "Return" + } + }, + { + "statements": [], + "terminator": { + "kind": { + "Call": { + "args": [ { - "Move": { - "local": 4, - "projection": [] + "Constant": { + "const_": { + "kind": { + "Allocated": { + "align": 8, + "bytes": [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 30, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "mutability": "Mut", + "provenance": { + "ptrs": [ + [ + 0, + 1 + ] + ] + } + } + } + }, + "user_ty": null } } ], "destination": { - "local": 5, + "local": 10, "projection": [] }, "func": { "Constant": { "const_": { - "id": 0, "kind": "ZeroSized" }, - "span": 0, "user_ty": null } }, - "target": 1, + "target": null, "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": [ { - "mutability": "Mut", - "span": 8 + "mutability": "Mut" + }, + { + "mutability": "Mut" + }, + { + "mutability": "Mut" }, { - "mutability": "Not", - "span": 9 + "mutability": "Mut" }, { - "mutability": "Not", - "span": 10 + "mutability": "Mut" }, { - "mutability": "Not", - "span": 11 + "mutability": "Mut" }, { - "mutability": "Not", - "span": 12 + "mutability": "Mut" }, { - "mutability": "Mut", - "span": 1 + "mutability": "Mut" }, { - "mutability": "Mut", - "span": 2 + "mutability": "Mut" }, { - "mutability": "Not", - "span": 2 + "mutability": "Mut" }, { - "mutability": "Not", - "span": 3 + "mutability": "Mut" } ], - "span": 13, "spread_arg": null, "var_debug_info": [ { - "argument_index": 1, - "composite": null, - "name": "main", - "source_info": { - "scope": 0, - "span": 9 - }, - "value": { - "Place": { - "local": 1, - "projection": [] - } - } - }, - { - "argument_index": 2, + "argument_index": null, "composite": null, - "name": "argc", + "name": "a", "source_info": { - "scope": 0, - "span": 10 + "scope": 1 }, "value": { - "Place": { - "local": 2, - "projection": [] + "Const": { + "const_": { + "kind": { + "Allocated": { + "align": 4, + "bytes": [ + 0, + 0, + 96, + 64 + ], + "mutability": "Mut", + "provenance": { + "ptrs": [] + } + } + } + }, + "user_ty": null } } }, { - "argument_index": 3, + "argument_index": null, "composite": null, - "name": "argv", + "name": "b", "source_info": { - "scope": 0, - "span": 11 + "scope": 2 }, "value": { - "Place": { - "local": 3, - "projection": [] + "Const": { + "const_": { + "kind": { + "Allocated": { + "align": 4, + "bytes": [ + 154, + 153, + 153, + 63 + ], + "mutability": "Mut", + "provenance": { + "ptrs": [] + } + } + } + }, + "user_ty": null } } }, { - "argument_index": 4, + "argument_index": null, "composite": null, - "name": "sigpipe", + "name": "c", "source_info": { - "scope": 0, - "span": 12 + "scope": 3 }, "value": { - "Place": { - "local": 4, - "projection": [] + "Const": { + "const_": { + "kind": { + "Allocated": { + "align": 8, + "bytes": [ + 0, + 0, + 0, + 0, + 0, + 0, + 12, + 64 + ], + "mutability": "Mut", + "provenance": { + "ptrs": [] + } + } + } + }, + "user_ty": null } } }, { "argument_index": null, "composite": null, - "name": "v", + "name": "d", "source_info": { - "scope": 1, - "span": 6 + "scope": 4 }, "value": { - "Place": { - "local": 0, - "projection": [] + "Const": { + "const_": { + "kind": { + "Allocated": { + "align": 8, + "bytes": [ + 51, + 51, + 51, + 51, + 51, + 51, + 243, + 63 + ], + "mutability": "Mut", + "provenance": { + "ptrs": [] + } + } + } + }, + "user_ty": null } } } ] }, - "id": 0, - "name": "std::rt::lang_start::<()>" + "name": "main" } }, - "symbol_name": "_ZN3std2rt10lang_start17h" + "symbol_name": "_ZN5float4main17h" } ], "types": [ @@ -2190,54 +1874,6 @@ } } ], - [ - { - "EnumType": { - "discriminants": [ - 0, - 1 - ], - "fields": "elided", - "layout": { - "abi": { - "Scalar": { - "Initialized": { - "valid_range": { - "end": 18446744073709551615, - "start": 0 - }, - "value": { - "Int": { - "length": "I64", - "signed": true - } - } - } - } - }, - "abi_align": 8, - "fields": { - "Arbitrary": { - "offsets": [ - { - "num_bits": 0 - } - ] - } - }, - "size": { - "num_bits": 64 - }, - "variants": { - "Single": { - "index": 0 - } - } - }, - "name": "std::result::Result" - } - } - ], [ { "StructType": { @@ -2591,39 +2227,6 @@ } } ], - [ - { - "RefType": { - "layout": { - "abi": { - "Scalar": { - "Initialized": { - "valid_range": { - "end": 18446744073709551615, - "start": 1 - }, - "value": { - "Pointer": 0 - } - } - } - }, - "abi_align": 8, - "fields": "Primitive", - "size": { - "num_bits": 64 - }, - "variants": { - "Single": { - "index": 0 - } - } - }, - "mutability": "Not", - "pointee_type": "elided" - } - } - ], [ { "RefType": { diff --git a/tests/integration/programs/fn-ptr-in-arg.smir.json.expected b/tests/integration/expected/nightly-2025-03-01/fn-ptr-in-arg.smir.json.expected similarity index 86% rename from tests/integration/programs/fn-ptr-in-arg.smir.json.expected rename to tests/integration/expected/nightly-2025-03-01/fn-ptr-in-arg.smir.json.expected index e953ad3b..25059921 100644 --- a/tests/integration/programs/fn-ptr-in-arg.smir.json.expected +++ b/tests/integration/expected/nightly-2025-03-01/fn-ptr-in-arg.smir.json.expected @@ -100,6 +100,26 @@ "NormalSym": "_ZN4core3cmp5impls54_$LT$impl$u20$core..cmp..PartialEq$u20$for$u20$u64$GT$2eq17h" } ], + [ + { + "NormalSym": "_ZN4core3fmt3num3imp52_$LT$impl$u20$core..fmt..Display$u20$for$u20$u64$GT$3fmt17h" + } + ], + [ + { + "NormalSym": "_ZN4core3fmt3num50_$LT$impl$u20$core..fmt..Debug$u20$for$u20$u64$GT$3fmt17h" + } + ], + [ + { + "NormalSym": "_ZN4core3fmt3num53_$LT$impl$u20$core..fmt..LowerHex$u20$for$u20$u64$GT$3fmt17h" + } + ], + [ + { + "NormalSym": "_ZN4core3fmt3num53_$LT$impl$u20$core..fmt..UpperHex$u20$for$u20$u64$GT$3fmt17h" + } + ], [ { "NormalSym": "_ZN4core3fmt9Formatter25debug_tuple_field1_finish17h" @@ -181,13 +201,12 @@ { "Aggregate": [ { - "Array": 9 + "Array": 0 }, [ { "Constant": { "const_": { - "id": 21, "kind": { "Allocated": { "align": 1, @@ -201,14 +220,12 @@ } } }, - "span": 123, "user_ty": null } }, { "Constant": { "const_": { - "id": 22, "kind": { "Allocated": { "align": 1, @@ -222,14 +239,12 @@ } } }, - "span": 124, "user_ty": null } }, { "Constant": { "const_": { - "id": 22, "kind": { "Allocated": { "align": 1, @@ -243,14 +258,12 @@ } } }, - "span": 125, "user_ty": null } }, { "Constant": { "const_": { - "id": 22, "kind": { "Allocated": { "align": 1, @@ -264,14 +277,12 @@ } } }, - "span": 126, "user_ty": null } }, { "Constant": { "const_": { - "id": 22, "kind": { "Allocated": { "align": 1, @@ -285,14 +296,12 @@ } } }, - "span": 127, "user_ty": null } }, { "Constant": { "const_": { - "id": 22, "kind": { "Allocated": { "align": 1, @@ -306,14 +315,12 @@ } } }, - "span": 128, "user_ty": null } }, { "Constant": { "const_": { - "id": 22, "kind": { "Allocated": { "align": 1, @@ -327,14 +334,12 @@ } } }, - "span": 129, "user_ty": null } }, { "Constant": { "const_": { - "id": 22, "kind": { "Allocated": { "align": 1, @@ -348,7 +353,6 @@ } } }, - "span": 130, "user_ty": null } } @@ -356,8 +360,7 @@ ] } ] - }, - "span": 131 + } }, { "kind": { @@ -370,11 +373,11 @@ "Aggregate": [ { "Adt": [ - 9, + 0, 1, [ { - "Type": 29 + "Type": 0 } ], null, @@ -392,8 +395,7 @@ ] } ] - }, - "span": 132 + } } ], "terminator": { @@ -409,10 +411,8 @@ { "Constant": { "const_": { - "id": 20, "kind": "ZeroSized" }, - "span": 121, "user_ty": null } } @@ -424,18 +424,15 @@ "func": { "Constant": { "const_": { - "id": 19, "kind": "ZeroSized" }, - "span": 120, "user_ty": null } }, "target": 1, "unwind": "Continue" } - }, - "span": 122 + } } }, { @@ -460,8 +457,7 @@ ] } ] - }, - "span": 134 + } }, { "kind": { @@ -474,7 +470,6 @@ "Use": { "Constant": { "const_": { - "id": 24, "kind": { "Allocated": { "align": 8, @@ -500,14 +495,12 @@ } } }, - "span": 135, "user_ty": null } } } ] - }, - "span": 135 + } }, { "kind": { @@ -536,8 +529,7 @@ ] } ] - }, - "span": 136 + } }, { "kind": { @@ -554,7 +546,7 @@ { "Field": [ 0, - 25 + 0 ] } ] @@ -562,8 +554,7 @@ } } ] - }, - "span": 137 + } }, { "kind": { @@ -580,7 +571,7 @@ { "Field": [ 1, - 25 + 0 ] } ] @@ -588,8 +579,7 @@ } } ] - }, - "span": 138 + } } ], "terminator": { @@ -616,18 +606,15 @@ "func": { "Constant": { "const_": { - "id": 23, "kind": "ZeroSized" }, - "span": 133, "user_ty": null } }, "target": 2, "unwind": "Continue" } - }, - "span": 133 + } } }, { @@ -651,15 +638,13 @@ "otherwise": 3 } } - }, - "span": 133 + } } }, { "statements": [], "terminator": { - "kind": "Return", - "span": 139 + "kind": "Return" } }, { @@ -675,7 +660,7 @@ "Aggregate": [ { "Adt": [ - 15, + 0, 0, [], null, @@ -686,8 +671,7 @@ ] } ] - }, - "span": 142 + } }, { "kind": { @@ -700,11 +684,11 @@ "Aggregate": [ { "Adt": [ - 9, + 0, 0, [ { - "Type": 54 + "Type": 0 } ], null, @@ -715,8 +699,7 @@ ] } ] - }, - "span": 143 + } } ], "terminator": { @@ -755,76 +738,59 @@ "func": { "Constant": { "const_": { - "id": 25, "kind": "ZeroSized" }, - "span": 140, "user_ty": null } }, "target": null, "unwind": "Continue" } - }, - "span": 141 + } } } ], "locals": [ { - "mutability": "Mut", - "span": 144 + "mutability": "Mut" }, { - "mutability": "Not", - "span": 145 + "mutability": "Not" }, { - "mutability": "Not", - "span": 146 + "mutability": "Not" }, { - "mutability": "Not", - "span": 147 + "mutability": "Not" }, { - "mutability": "Mut", - "span": 136 + "mutability": "Mut" }, { - "mutability": "Mut", - "span": 134 + "mutability": "Mut" }, { - "mutability": "Mut", - "span": 135 + "mutability": "Mut" }, { - "mutability": "Not", - "span": 137 + "mutability": "Not" }, { - "mutability": "Not", - "span": 138 + "mutability": "Not" }, { - "mutability": "Mut", - "span": 133 + "mutability": "Mut" }, { - "mutability": "Not", - "span": 148 + "mutability": "Not" }, { - "mutability": "Not", - "span": 141 + "mutability": "Not" }, { - "mutability": "Mut", - "span": 143 + "mutability": "Mut" } ], - "span": 149, "spread_arg": null, "var_debug_info": [ { @@ -832,8 +798,7 @@ "composite": null, "name": "bytes", "source_info": { - "scope": 1, - "span": 145 + "scope": 1 }, "value": { "Place": { @@ -847,8 +812,7 @@ "composite": null, "name": "opt", "source_info": { - "scope": 2, - "span": 146 + "scope": 2 }, "value": { "Place": { @@ -862,8 +826,7 @@ "composite": null, "name": "result", "source_info": { - "scope": 3, - "span": 147 + "scope": 3 }, "value": { "Place": { @@ -877,8 +840,7 @@ "composite": null, "name": "left_val", "source_info": { - "scope": 4, - "span": 137 + "scope": 4 }, "value": { "Place": { @@ -892,8 +854,7 @@ "composite": null, "name": "right_val", "source_info": { - "scope": 4, - "span": 138 + "scope": 4 }, "value": { "Place": { @@ -907,8 +868,7 @@ "composite": null, "name": "kind", "source_info": { - "scope": 5, - "span": 148 + "scope": 5 }, "value": { "Place": { @@ -919,7 +879,6 @@ } ] }, - "id": 14, "name": "main" } }, @@ -930,133 +889,134 @@ "mono_item_kind": { "MonoItemFn": { "body": { - "arg_count": 1, - "blocks": [ - { - "statements": [], - "terminator": { - "kind": "Return", - "span": 68 - } - } - ], - "locals": [ - { - "mutability": "Mut", - "span": 68 - }, - { - "mutability": "Not", - "span": 68 - } - ], - "span": 68, - "spread_arg": null, - "var_debug_info": [] - }, - "id": 7, - "name": "std::ptr::drop_in_place::<&std::option::Option>" - } - }, - "symbol_name": "_ZN4core3ptr56drop_in_place$LT$$RF$core..option..Option$LT$u64$GT$$GT$17h" - }, - { - "details": null, - "mono_item_kind": { - "MonoItemFn": { - "body": { - "arg_count": 1, - "blocks": [ - { - "statements": [], - "terminator": { - "kind": "Return", - "span": 68 - } - } - ], - "locals": [ - { - "mutability": "Mut", - "span": 68 - }, - { - "mutability": "Not", - "span": 68 - } - ], - "span": 68, - "spread_arg": null, - "var_debug_info": [] - }, - "id": 7, - "name": "std::ptr::drop_in_place::<&u64>" - } - }, - "symbol_name": "_ZN4core3ptr28drop_in_place$LT$$RF$u64$GT$17h" - }, - { - "details": null, - "mono_item_kind": { - "MonoItemFn": { - "body": { - "arg_count": 1, - "blocks": [ - { - "statements": [], - "terminator": { - "kind": "Return", - "span": 68 - } - } - ], - "locals": [ - { - "mutability": "Mut", - "span": 68 - }, - { - "mutability": "Not", - "span": 68 - } - ], - "span": 68, - "spread_arg": null, - "var_debug_info": [] - }, - "id": 7, - "name": "std::ptr::drop_in_place::<{closure@std::rt::lang_start<()>::{closure#0}}>" - } - }, - "symbol_name": "_ZN4core3ptr85drop_in_place$LT$std..rt..lang_start$LT$$LP$$RP$$GT$..$u7b$$u7b$closure$u7d$$u7d$$GT$17h" - }, - { - "details": null, - "mono_item_kind": { - "MonoItemFn": { - "body": { - "arg_count": 1, + "arg_count": 4, "blocks": [ { - "statements": [], + "statements": [ + { + "kind": { + "StorageLive": 5 + } + }, + { + "kind": { + "StorageLive": 7 + } + }, + { + "kind": { + "Assign": [ + { + "local": 7, + "projection": [] + }, + { + "Aggregate": [ + { + "Closure": [ + 0, + [ + { + "Type": 0 + }, + { + "Type": 0 + }, + { + "Type": 0 + }, + { + "Type": 0 + } + ] + ] + }, + [ + { + "Copy": { + "local": 1, + "projection": [] + } + } + ] + ] + } + ] + } + }, + { + "kind": { + "Assign": [ + { + "local": 6, + "projection": [] + }, + { + "Ref": [ + { + "kind": "ReErased" + }, + "Shared", + { + "local": 7, + "projection": [] + } + ] + } + ] + } + }, + { + "kind": { + "Assign": [ + { + "local": 5, + "projection": [] + }, + { + "Cast": [ + { + "PointerCoercion": "Unsize" + }, + { + "Copy": { + "local": 6, + "projection": [] + } + }, + 0 + ] + } + ] + } + } + ], "terminator": { "kind": { "Call": { "args": [ { "Move": { - "local": 1, + "local": 5, "projection": [] } }, { - "Constant": { - "const_": { - "id": 4, - "kind": "ZeroSized" - }, - "span": 32, - "user_ty": null + "Move": { + "local": 2, + "projection": [] + } + }, + { + "Move": { + "local": 3, + "projection": [] + } + }, + { + "Move": { + "local": 4, + "projection": [] } } ], @@ -1067,199 +1027,69 @@ "func": { "Constant": { "const_": { - "id": 3, "kind": "ZeroSized" }, - "span": 31, "user_ty": null } }, "target": 1, "unwind": "Continue" } - }, - "span": 33 + } } }, { - "statements": [], - "terminator": { - "kind": { - "Call": { - "args": [ - { - "Constant": { - "const_": { - "id": 4, - "kind": "ZeroSized" - }, - "span": 32, - "user_ty": null - } - } - ], - "destination": { - "local": 2, - "projection": [] - }, - "func": { - "Constant": { - "const_": { - "id": 5, - "kind": "ZeroSized" - }, - "span": 34, - "user_ty": null - } - }, - "target": 2, - "unwind": "Unreachable" + "statements": [ + { + "kind": { + "StorageDead": 5 } }, - "span": 35 - } - }, - { - "statements": [], + { + "kind": { + "StorageDead": 7 + } + } + ], "terminator": { - "kind": "Return", - "span": 36 + "kind": "Return" } } ], "locals": [ { - "mutability": "Mut", - "span": 37 + "mutability": "Mut" }, { - "mutability": "Not", - "span": 38 + "mutability": "Not" }, { - "mutability": "Not", - "span": 39 - } - ], - "span": 42, - "spread_arg": null, - "var_debug_info": [ - { - "argument_index": 1, - "composite": null, - "name": "f", - "source_info": { - "scope": 0, - "span": 38 - }, - "value": { - "Place": { - "local": 1, - "projection": [] - } - } + "mutability": "Not" }, { - "argument_index": null, - "composite": null, - "name": "result", - "source_info": { - "scope": 1, - "span": 40 - }, - "value": { - "Place": { - "local": 0, - "projection": [] - } - } + "mutability": "Not" }, { - "argument_index": 1, - "composite": null, - "name": "dummy", - "source_info": { - "scope": 2, - "span": 41 - }, - "value": { - "Const": { - "const_": { - "id": 4, - "kind": "ZeroSized" - }, - "span": 32, - "user_ty": null - } - } - } - ] - }, - "id": 2, - "name": "std::sys::backtrace::__rust_begin_short_backtrace::" - } - }, - "symbol_name": "_ZN3std3sys9backtrace28__rust_begin_short_backtrace17h" - }, - { - "details": null, - "mono_item_kind": { - "MonoItemFn": { - "body": { - "arg_count": 1, - "blocks": [ + "mutability": "Not" + }, { - "statements": [ - { - "kind": { - "Assign": [ - { - "local": 0, - "projection": [] - }, - { - "Cast": [ - "Transmute", - { - "Copy": { - "local": 1, - "projection": [] - } - }, - 28 - ] - } - ] - }, - "span": 61 - } - ], - "terminator": { - "kind": "Return", - "span": 60 - } - } - ], - "locals": [ + "mutability": "Mut" + }, { - "mutability": "Mut", - "span": 62 + "mutability": "Not" }, { - "mutability": "Not", - "span": 63 + "mutability": "Not" } ], - "span": 66, "spread_arg": null, "var_debug_info": [ { "argument_index": 1, "composite": null, - "name": "bytes", + "name": "main", "source_info": { - "scope": 0, - "span": 63 + "scope": 0 }, "value": { "Place": { @@ -1269,132 +1099,53 @@ } }, { - "argument_index": 1, + "argument_index": 2, "composite": null, - "name": "bytes", + "name": "argc", "source_info": { - "scope": 1, - "span": 64 + "scope": 0 }, "value": { "Place": { - "local": 1, + "local": 2, "projection": [] } } }, { - "argument_index": 1, + "argument_index": 3, "composite": null, - "name": "x", + "name": "argv", "source_info": { - "scope": 2, - "span": 65 + "scope": 0 }, "value": { "Place": { - "local": 0, + "local": 3, "projection": [] } } - } - ] - }, - "id": 5, - "name": "core::num::::from_le_bytes" - } - }, - "symbol_name": "_ZN4core3num21_$LT$impl$u20$u64$GT$13from_le_bytes17h" - }, - { - "details": null, - "mono_item_kind": { - "MonoItemFn": { - "body": { - "arg_count": 1, - "blocks": [ - { - "statements": [ - { - "kind": { - "Assign": [ - { - "local": 0, - "projection": [] - }, - { - "Use": { - "Constant": { - "const_": { - "id": 11, - "kind": { - "Allocated": { - "align": 1, - "bytes": [ - 0 - ], - "mutability": "Mut", - "provenance": { - "ptrs": [] - } - } - } - }, - "span": 96, - "user_ty": null - } - } - } - ] - }, - "span": 96 - } - ], - "terminator": { - "kind": "Return", - "span": 95 - } - } - ], - "locals": [ - { - "mutability": "Mut", - "span": 97 }, { - "mutability": "Not", - "span": 98 - } - ], - "span": 99, - "spread_arg": null, - "var_debug_info": [ - { - "argument_index": 1, + "argument_index": 4, "composite": null, - "name": "self", + "name": "sigpipe", "source_info": { - "scope": 0, - "span": 98 + "scope": 0 }, "value": { - "Const": { - "const_": { - "id": 4, - "kind": "ZeroSized" - }, - "span": 32, - "user_ty": null + "Place": { + "local": 4, + "projection": [] } } } ] }, - "id": 11, - "name": "<() as std::process::Termination>::report" + "name": "std::rt::lang_start::<()>" } }, - "symbol_name": "_ZN54_$LT$$LP$$RP$$u20$as$u20$std..process..Termination$GT$6report17h" + "symbol_name": "_ZN3std2rt10lang_start17h" }, { "details": null, @@ -1408,20 +1159,17 @@ { "kind": { "StorageLive": 2 - }, - "span": 16 + } }, { "kind": { "StorageLive": 3 - }, - "span": 15 + } }, { "kind": { "StorageLive": 4 - }, - "span": 17 + } }, { "kind": { @@ -1439,7 +1187,7 @@ { "Field": [ 0, - 7 + 0 ] } ] @@ -1447,8 +1195,7 @@ } } ] - }, - "span": 17 + } } ], "terminator": { @@ -1469,18 +1216,15 @@ "func": { "Constant": { "const_": { - "id": 1, "kind": "ZeroSized" }, - "span": 14, "user_ty": null } }, "target": 1, "unwind": "Continue" } - }, - "span": 15 + } } }, { @@ -1488,8 +1232,7 @@ { "kind": { "StorageDead": 4 - }, - "span": 19 + } } ], "terminator": { @@ -1510,18 +1253,15 @@ "func": { "Constant": { "const_": { - "id": 2, "kind": "ZeroSized" }, - "span": 18, "user_ty": null } }, "target": 2, "unwind": "Continue" } - }, - "span": 16 + } } }, { @@ -1529,14 +1269,12 @@ { "kind": { "StorageDead": 3 - }, - "span": 21 + } }, { "kind": { "StorageLive": 5 - }, - "span": 22 + } }, { "kind": { @@ -1546,71 +1284,34 @@ "projection": [] }, { - "Ref": [ - { - "kind": "ReErased" - }, - "Shared", - { + "Use": { + "Copy": { "local": 2, "projection": [ { "Field": [ 0, - 15 + 0 + ] + }, + { + "Field": [ + 0, + 0 ] } ] } - ] + } } ] - }, - "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, + "local": 0, "projection": [] }, { @@ -1618,73 +1319,52 @@ "IntToInt", { "Move": { - "local": 6, + "local": 5, "projection": [] } }, - 16 + 0 ] } ] - }, - "span": 24 - }, - { - "kind": { - "StorageDead": 6 - }, - "span": 25 + } }, { "kind": { "StorageDead": 5 - }, - "span": 26 + } }, { "kind": { "StorageDead": 2 - }, - "span": 27 + } } ], "terminator": { - "kind": "Return", - "span": 20 + "kind": "Return" } } ], "locals": [ { - "mutability": "Mut", - "span": 28 - }, - { - "mutability": "Mut", - "span": 3 + "mutability": "Mut" }, { - "mutability": "Mut", - "span": 16 + "mutability": "Mut" }, { - "mutability": "Mut", - "span": 15 + "mutability": "Mut" }, { - "mutability": "Mut", - "span": 17 + "mutability": "Mut" }, { - "mutability": "Mut", - "span": 22 + "mutability": "Mut" }, { - "mutability": "Mut", - "span": 23 + "mutability": "Mut" } ], - "span": 3, "spread_arg": null, "var_debug_info": [ { @@ -1692,8 +1372,7 @@ "composite": null, "name": "main", "source_info": { - "scope": 0, - "span": 9 + "scope": 0 }, "value": { "Place": { @@ -1703,7 +1382,7 @@ { "Field": [ 0, - 7 + 0 ] } ] @@ -1715,8 +1394,7 @@ "composite": null, "name": "self", "source_info": { - "scope": 1, - "span": 29 + "scope": 1 }, "value": { "Place": { @@ -1724,25 +1402,9 @@ "projection": [] } } - }, - { - "argument_index": 1, - "composite": null, - "name": "self", - "source_info": { - "scope": 2, - "span": 30 - }, - "value": { - "Place": { - "local": 5, - "projection": [] - } - } } ] }, - "id": 1, "name": "std::rt::lang_start::<()>::{closure#0}" } }, @@ -1753,62 +1415,150 @@ "mono_item_kind": { "MonoItemFn": { "body": { - "arg_count": 2, + "arg_count": 1, "blocks": [ { "statements": [], "terminator": { "kind": { "Call": { - "args": [], + "args": [ + { + "Move": { + "local": 1, + "projection": [] + } + }, + { + "Constant": { + "const_": { + "kind": "ZeroSized" + }, + "user_ty": null + } + } + ], "destination": { "local": 0, "projection": [] }, "func": { - "Move": { - "local": 1, - "projection": [] + "Constant": { + "const_": { + "kind": "ZeroSized" + }, + "user_ty": null } }, "target": 1, "unwind": "Continue" } - }, - "span": 67 + } + } + }, + { + "statements": [], + "terminator": { + "kind": { + "Call": { + "args": [ + { + "Constant": { + "const_": { + "kind": "ZeroSized" + }, + "user_ty": null + } + } + ], + "destination": { + "local": 2, + "projection": [] + }, + "func": { + "Constant": { + "const_": { + "kind": "ZeroSized" + }, + "user_ty": null + } + }, + "target": 2, + "unwind": "Unreachable" + } + } } }, { "statements": [], "terminator": { - "kind": "Return", - "span": 67 + "kind": "Return" } } ], "locals": [ { - "mutability": "Mut", - "span": 67 + "mutability": "Mut" }, { - "mutability": "Not", - "span": 67 + "mutability": "Not" }, { - "mutability": "Not", - "span": 67 + "mutability": "Not" } ], - "span": 67, - "spread_arg": 2, - "var_debug_info": [] + "spread_arg": null, + "var_debug_info": [ + { + "argument_index": 1, + "composite": null, + "name": "f", + "source_info": { + "scope": 0 + }, + "value": { + "Place": { + "local": 1, + "projection": [] + } + } + }, + { + "argument_index": null, + "composite": null, + "name": "result", + "source_info": { + "scope": 1 + }, + "value": { + "Place": { + "local": 0, + "projection": [] + } + } + }, + { + "argument_index": 1, + "composite": null, + "name": "dummy", + "source_info": { + "scope": 2 + }, + "value": { + "Const": { + "const_": { + "kind": "ZeroSized" + }, + "user_ty": null + } + } + } + ] }, - "id": 6, - "name": ">::call_once" + "name": "std::sys::backtrace::__rust_begin_short_backtrace::" } }, - "symbol_name": "_ZN4core3ops8function6FnOnce9call_once17h" + "symbol_name": "_ZN3std3sys9backtrace28__rust_begin_short_backtrace17h" }, { "details": null, @@ -1818,17 +1568,36 @@ "arg_count": 2, "blocks": [ { - "statements": [], + "statements": [ + { + "kind": { + "Assign": [ + { + "local": 3, + "projection": [] + }, + { + "Use": { + "Copy": { + "local": 1, + "projection": [ + "Deref" + ] + } + } + } + ] + } + } + ], "terminator": { "kind": { "Call": { "args": [ { "Move": { - "local": 1, - "projection": [ - "Deref" - ] + "local": 3, + "projection": [] } }, { @@ -1845,51 +1614,74 @@ "func": { "Constant": { "const_": { - "id": 7, "kind": "ZeroSized" }, - "span": 67, "user_ty": null } }, "target": 1, "unwind": "Continue" } - }, - "span": 67 + } } }, { "statements": [], "terminator": { - "kind": "Return", - "span": 67 + "kind": "Return" } } ], "locals": [ { - "mutability": "Mut", - "span": 67 + "mutability": "Mut" }, { - "mutability": "Not", - "span": 67 + "mutability": "Not" }, { - "mutability": "Not", - "span": 67 + "mutability": "Not" + }, + { + "mutability": "Mut" } ], - "span": 67, - "spread_arg": 2, - "var_debug_info": [] + "spread_arg": null, + "var_debug_info": [ + { + "argument_index": 1, + "composite": null, + "name": "self", + "source_info": { + "scope": 0 + }, + "value": { + "Place": { + "local": 1, + "projection": [] + } + } + }, + { + "argument_index": 2, + "composite": null, + "name": "f", + "source_info": { + "scope": 0 + }, + "value": { + "Place": { + "local": 2, + "projection": [] + } + } + } + ] }, - "id": 6, - "name": "<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once" + "name": "<&std::option::Option as std::fmt::Debug>::fmt" } }, - "symbol_name": "_ZN4core3ops8function6FnOnce40call_once$u7b$$u7b$vtable.shim$u7d$$u7d$17h" + "symbol_name": "_ZN42_$LT$$RF$T$u20$as$u20$core..fmt..Debug$GT$3fmt17h" }, { "details": null, @@ -1899,22 +1691,42 @@ "arg_count": 2, "blocks": [ { - "statements": [], + "statements": [ + { + "kind": { + "Assign": [ + { + "local": 3, + "projection": [] + }, + { + "Use": { + "Copy": { + "local": 1, + "projection": [ + "Deref" + ] + } + } + } + ] + } + } + ], "terminator": { "kind": { "Call": { "args": [ + { + "Move": { + "local": 3, + "projection": [] + } + }, { "Move": { "local": 2, - "projection": [ - { - "Field": [ - 0, - 29 - ] - } - ] + "projection": [] } } ], @@ -1923,49 +1735,76 @@ "projection": [] }, "func": { - "Move": { - "local": 1, - "projection": [] + "Constant": { + "const_": { + "kind": "ZeroSized" + }, + "user_ty": null } }, "target": 1, "unwind": "Continue" } - }, - "span": 67 + } } }, { "statements": [], "terminator": { - "kind": "Return", - "span": 67 + "kind": "Return" } } ], "locals": [ { - "mutability": "Mut", - "span": 67 + "mutability": "Mut" }, { - "mutability": "Not", - "span": 67 + "mutability": "Not" }, { - "mutability": "Not", - "span": 67 + "mutability": "Not" + }, + { + "mutability": "Mut" } ], - "span": 67, - "spread_arg": 2, - "var_debug_info": [] + "spread_arg": null, + "var_debug_info": [ + { + "argument_index": 1, + "composite": null, + "name": "self", + "source_info": { + "scope": 0 + }, + "value": { + "Place": { + "local": 1, + "projection": [] + } + } + }, + { + "argument_index": 2, + "composite": null, + "name": "f", + "source_info": { + "scope": 0 + }, + "value": { + "Place": { + "local": 2, + "projection": [] + } + } + } + ] }, - "id": 6, - "name": " u64 {core::num::::from_le_bytes} as std::ops::FnOnce<([u8; 8],)>>::call_once" + "name": "<&u64 as std::fmt::Debug>::fmt" } }, - "symbol_name": "_ZN4core3ops8function6FnOnce9call_once17h" + "symbol_name": "_ZN42_$LT$$RF$T$u20$as$u20$core..fmt..Debug$GT$3fmt17h" }, { "details": null, @@ -1976,6 +1815,11 @@ "blocks": [ { "statements": [ + { + "kind": { + "StorageLive": 3 + } + }, { "kind": { "Assign": [ @@ -1984,52 +1828,43 @@ "projection": [] }, { - "Discriminant": { - "local": 1, - "projection": [] + "Use": { + "Copy": { + "local": 1, + "projection": [ + "Deref" + ] + } } } ] - }, - "span": 70 - } - ], - "terminator": { - "kind": { - "SwitchInt": { - "discr": { - "Move": { - "local": 3, + } + }, + { + "kind": { + "StorageLive": 4 + } + }, + { + "kind": { + "Assign": [ + { + "local": 4, "projection": [] + }, + { + "Use": { + "Copy": { + "local": 2, + "projection": [ + "Deref" + ] + } + } } - }, - "targets": { - "branches": [ - [ - 0, - 2 - ], - [ - 1, - 3 - ] - ], - "otherwise": 1 - } + ] } }, - "span": 69 - } - }, - { - "statements": [], - "terminator": { - "kind": "Unreachable", - "span": 70 - } - }, - { - "statements": [ { "kind": { "Assign": [ @@ -2038,44 +1873,114 @@ "projection": [] }, { - "Aggregate": [ + "BinaryOp": [ + "Eq", { - "Adt": [ - 9, - 0, - [ - { - "Type": 28 - } - ], - null, - null - ] + "Move": { + "local": 3, + "projection": [] + } }, - [] + { + "Move": { + "local": 4, + "projection": [] + } + } ] } ] - }, - "span": 72 + } + }, + { + "kind": { + "StorageDead": 4 + } + }, + { + "kind": { + "StorageDead": 3 + } } ], "terminator": { - "kind": { - "Drop": { - "place": { - "local": 2, - "projection": [] - }, - "target": 5, - "unwind": "Continue" - } - }, - "span": 71 + "kind": "Return" + } + } + ], + "locals": [ + { + "mutability": "Mut" + }, + { + "mutability": "Not" + }, + { + "mutability": "Not" + }, + { + "mutability": "Mut" + }, + { + "mutability": "Mut" + } + ], + "spread_arg": null, + "var_debug_info": [ + { + "argument_index": 1, + "composite": null, + "name": "self", + "source_info": { + "scope": 0 + }, + "value": { + "Place": { + "local": 1, + "projection": [] + } } }, + { + "argument_index": 2, + "composite": null, + "name": "other", + "source_info": { + "scope": 0 + }, + "value": { + "Place": { + "local": 2, + "projection": [] + } + } + } + ] + }, + "name": "std::cmp::impls::::eq" + } + }, + "symbol_name": "_ZN4core3cmp5impls54_$LT$impl$u20$core..cmp..PartialEq$u20$for$u20$u64$GT$2eq17h" + }, + { + "details": null, + "mono_item_kind": { + "MonoItemFn": { + "body": { + "arg_count": 2, + "blocks": [ { "statements": [ + { + "kind": { + "StorageLive": 3 + } + }, + { + "kind": { + "StorageLive": 4 + } + }, { "kind": { "Assign": [ @@ -2085,16 +1990,20 @@ }, { "Use": { - "Move": { - "local": 1, + "Copy": { + "local": 2, "projection": [ + "Deref", { - "Downcast": 1 + "Field": [ + 0, + 0 + ] }, { "Field": [ 0, - 29 + 0 ] } ] @@ -2102,69 +2011,85 @@ } } ] - }, - "span": 75 - }, - { - "kind": { - "StorageLive": 5 - }, - "span": 74 - }, - { - "kind": { - "StorageLive": 6 - }, - "span": 73 + } }, { "kind": { "Assign": [ { - "local": 6, + "local": 3, "projection": [] }, { - "Use": { - "Move": { - "local": 2, - "projection": [] + "BinaryOp": [ + "BitAnd", + { + "Move": { + "local": 4, + "projection": [] + } + }, + { + "Constant": { + "const_": { + "kind": { + "Allocated": { + "align": 4, + "bytes": [ + 16, + 0, + 0, + 0 + ], + "mutability": "Mut", + "provenance": { + "ptrs": [] + } + } + } + }, + "user_ty": null + } } - } + ] } ] - }, - "span": 73 - }, - { - "kind": { - "StorageLive": 7 - }, - "span": 74 + } }, { "kind": { - "Assign": [ - { - "local": 7, + "StorageDead": 4 + } + } + ], + "terminator": { + "kind": { + "SwitchInt": { + "discr": { + "Move": { + "local": 3, "projection": [] - }, - { - "Aggregate": [ - "Tuple", - [ - { - "Copy": { - "local": 4, - "projection": [] - } - } - ] - ] } - ] - }, - "span": 74 + }, + "targets": { + "branches": [ + [ + 0, + 2 + ] + ], + "otherwise": 1 + } + } + } + } + }, + { + "statements": [ + { + "kind": { + "StorageDead": 3 + } } ], "terminator": { @@ -2173,147 +2098,281 @@ "args": [ { "Move": { - "local": 6, + "local": 1, "projection": [] } }, { "Move": { - "local": 7, + "local": 2, "projection": [] } } ], "destination": { - "local": 5, + "local": 0, "projection": [] }, "func": { "Constant": { "const_": { - "id": 9, "kind": "ZeroSized" }, - "span": 73, "user_ty": null } }, - "target": 4, + "target": 6, "unwind": "Continue" } - }, - "span": 74 + } } }, { "statements": [ { "kind": { - "StorageDead": 7 - }, - "span": 77 + "StorageDead": 3 + } }, { "kind": { - "StorageDead": 6 - }, - "span": 77 + "StorageLive": 5 + } + }, + { + "kind": { + "StorageLive": 6 + } }, { "kind": { "Assign": [ { - "local": 0, + "local": 6, "projection": [] }, { - "Aggregate": [ - { - "Adt": [ - 9, - 1, - [ - { - "Type": 28 - } - ], - null, - null + "Use": { + "Copy": { + "local": 2, + "projection": [ + "Deref", + { + "Field": [ + 0, + 0 + ] + }, + { + "Field": [ + 0, + 0 + ] + } ] + } + } + } + ] + } + }, + { + "kind": { + "Assign": [ + { + "local": 5, + "projection": [] + }, + { + "BinaryOp": [ + "BitAnd", + { + "Move": { + "local": 6, + "projection": [] + } }, - [ - { - "Move": { - "local": 5, - "projection": [] - } + { + "Constant": { + "const_": { + "kind": { + "Allocated": { + "align": 4, + "bytes": [ + 32, + 0, + 0, + 0 + ], + "mutability": "Mut", + "provenance": { + "ptrs": [] + } + } + } + }, + "user_ty": null } - ] + } ] } ] - }, - "span": 78 + } }, { "kind": { - "StorageDead": 5 - }, - "span": 76 + "StorageDead": 6 + } } ], "terminator": { "kind": { - "Goto": { - "target": 5 + "SwitchInt": { + "discr": { + "Move": { + "local": 5, + "projection": [] + } + }, + "targets": { + "branches": [ + [ + 0, + 4 + ] + ], + "otherwise": 3 + } } - }, - "span": 76 + } } }, { - "statements": [], + "statements": [ + { + "kind": { + "StorageDead": 5 + } + } + ], "terminator": { - "kind": "Return", - "span": 79 + "kind": { + "Call": { + "args": [ + { + "Move": { + "local": 1, + "projection": [] + } + }, + { + "Move": { + "local": 2, + "projection": [] + } + } + ], + "destination": { + "local": 0, + "projection": [] + }, + "func": { + "Constant": { + "const_": { + "kind": "ZeroSized" + }, + "user_ty": null + } + }, + "target": 5, + "unwind": "Continue" + } + } } - } - ], - "locals": [ - { - "mutability": "Mut", - "span": 80 - }, - { - "mutability": "Not", - "span": 81 - }, - { - "mutability": "Not", - "span": 82 - }, - { - "mutability": "Mut", - "span": 83 - }, - { - "mutability": "Not", - "span": 75 - }, - { - "mutability": "Mut", - "span": 74 - }, - { - "mutability": "Mut", - "span": 73 }, { - "mutability": "Mut", - "span": 74 - } + "statements": [ + { + "kind": { + "StorageDead": 5 + } + } + ], + "terminator": { + "kind": { + "Call": { + "args": [ + { + "Move": { + "local": 1, + "projection": [] + } + }, + { + "Move": { + "local": 2, + "projection": [] + } + } + ], + "destination": { + "local": 0, + "projection": [] + }, + "func": { + "Constant": { + "const_": { + "kind": "ZeroSized" + }, + "user_ty": null + } + }, + "target": 5, + "unwind": "Continue" + } + } + } + }, + { + "statements": [], + "terminator": { + "kind": { + "Goto": { + "target": 6 + } + } + } + }, + { + "statements": [], + "terminator": { + "kind": "Return" + } + } + ], + "locals": [ + { + "mutability": "Mut" + }, + { + "mutability": "Not" + }, + { + "mutability": "Not" + }, + { + "mutability": "Mut" + }, + { + "mutability": "Mut" + }, + { + "mutability": "Mut" + }, + { + "mutability": "Mut" + } ], - "span": 84, "spread_arg": null, "var_debug_info": [ { @@ -2321,8 +2380,7 @@ "composite": null, "name": "self", "source_info": { - "scope": 0, - "span": 81 + "scope": 0 }, "value": { "Place": { @@ -2336,8 +2394,7 @@ "composite": null, "name": "f", "source_info": { - "scope": 0, - "span": 82 + "scope": 0 }, "value": { "Place": { @@ -2347,34 +2404,46 @@ } }, { - "argument_index": null, + "argument_index": 1, "composite": null, - "name": "x", + "name": "self", "source_info": { - "scope": 1, - "span": 75 + "scope": 1 }, "value": { "Place": { - "local": 4, + "local": 2, + "projection": [] + } + } + }, + { + "argument_index": 1, + "composite": null, + "name": "self", + "source_info": { + "scope": 2 + }, + "value": { + "Place": { + "local": 2, "projection": [] } } } ] }, - "id": 8, - "name": "std::option::Option::<[u8; 8]>::map:: u64 {core::num::::from_le_bytes}>" + "name": "core::fmt::num::::fmt" } }, - "symbol_name": "_ZN4core6option15Option$LT$T$GT$3map17h" + "symbol_name": "_ZN4core3fmt3num50_$LT$impl$u20$core..fmt..Debug$u20$for$u20$u64$GT$3fmt17h" }, { "details": null, "mono_item_kind": { "MonoItemFn": { "body": { - "arg_count": 2, + "arg_count": 1, "blocks": [ { "statements": [ @@ -2382,109 +2451,271 @@ "kind": { "Assign": [ { - "local": 3, + "local": 0, "projection": [] }, { - "Discriminant": { + "Cast": [ + "Transmute", + { + "Copy": { + "local": 1, + "projection": [] + } + }, + 0 + ] + } + ] + } + } + ], + "terminator": { + "kind": "Return" + } + } + ], + "locals": [ + { + "mutability": "Mut" + }, + { + "mutability": "Not" + } + ], + "spread_arg": null, + "var_debug_info": [ + { + "argument_index": 1, + "composite": null, + "name": "bytes", + "source_info": { + "scope": 0 + }, + "value": { + "Place": { + "local": 1, + "projection": [] + } + } + } + ] + }, + "name": "core::num::::from_le_bytes" + } + }, + "symbol_name": "_ZN4core3num21_$LT$impl$u20$u64$GT$13from_le_bytes17h" + }, + { + "details": null, + "mono_item_kind": { + "MonoItemFn": { + "body": { + "arg_count": 2, + "blocks": [ + { + "statements": [], + "terminator": { + "kind": { + "Call": { + "args": [ + { + "Move": { "local": 1, "projection": [ "Deref" ] } + }, + { + "Move": { + "local": 2, + "projection": [] + } } - ] - }, - "span": 100 + ], + "destination": { + "local": 0, + "projection": [] + }, + "func": { + "Constant": { + "const_": { + "kind": "ZeroSized" + }, + "user_ty": null + } + }, + "target": 1, + "unwind": "Continue" + } } - ], + } + }, + { + "statements": [], + "terminator": { + "kind": "Return" + } + } + ], + "locals": [ + { + "mutability": "Mut" + }, + { + "mutability": "Not" + }, + { + "mutability": "Not" + } + ], + "spread_arg": 2, + "var_debug_info": [] + }, + "name": "<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once" + } + }, + "symbol_name": "_ZN4core3ops8function6FnOnce40call_once$u7b$$u7b$vtable.shim$u7d$$u7d$17h" + }, + { + "details": null, + "mono_item_kind": { + "MonoItemFn": { + "body": { + "arg_count": 2, + "blocks": [ + { + "statements": [], "terminator": { "kind": { - "SwitchInt": { - "discr": { + "Call": { + "args": [], + "destination": { + "local": 0, + "projection": [] + }, + "func": { "Move": { - "local": 3, + "local": 1, "projection": [] } }, - "targets": { - "branches": [ - [ - 0, - 3 - ], - [ - 1, - 2 - ] - ], - "otherwise": 1 - } + "target": 1, + "unwind": "Continue" } - }, - "span": 100 + } } }, { "statements": [], "terminator": { - "kind": "Unreachable", - "span": 100 + "kind": "Return" } + } + ], + "locals": [ + { + "mutability": "Mut" }, { - "statements": [ - { - "kind": { - "StorageLive": 4 - }, - "span": 101 - }, - { - "kind": { - "Assign": [ + "mutability": "Not" + }, + { + "mutability": "Not" + } + ], + "spread_arg": 2, + "var_debug_info": [] + }, + "name": ">::call_once" + } + }, + "symbol_name": "_ZN4core3ops8function6FnOnce9call_once17h" + }, + { + "details": null, + "mono_item_kind": { + "MonoItemFn": { + "body": { + "arg_count": 2, + "blocks": [ + { + "statements": [], + "terminator": { + "kind": { + "Call": { + "args": [ { - "local": 4, + "Move": { + "local": 2, + "projection": [ + { + "Field": [ + 0, + 0 + ] + } + ] + } + } + ], + "destination": { + "local": 0, + "projection": [] + }, + "func": { + "Move": { + "local": 1, "projection": [] - }, - { - "Ref": [ - { - "kind": "ReErased" - }, - "Shared", - { - "local": 1, - "projection": [ - "Deref", - { - "Downcast": 1 - }, - { - "Field": [ - 0, - 28 - ] - } - ] - } - ] } - ] - }, - "span": 101 - }, - { - "kind": { - "StorageLive": 5 - }, - "span": 101 - }, + }, + "target": 1, + "unwind": "Continue" + } + } + } + }, + { + "statements": [], + "terminator": { + "kind": "Return" + } + } + ], + "locals": [ + { + "mutability": "Mut" + }, + { + "mutability": "Not" + }, + { + "mutability": "Not" + } + ], + "spread_arg": 2, + "var_debug_info": [] + }, + "name": " u64 {core::num::::from_le_bytes} as std::ops::FnOnce<([u8; 8],)>>::call_once" + } + }, + "symbol_name": "_ZN4core3ops8function6FnOnce9call_once17h" + }, + { + "details": null, + "mono_item_kind": { + "MonoItemFn": { + "body": { + "arg_count": 2, + "blocks": [ + { + "statements": [ { "kind": { "Assign": [ { - "local": 6, + "local": 3, "projection": [] }, { @@ -2492,41 +2723,19 @@ { "kind": "ReErased" }, - "Shared", - { - "local": 4, - "projection": [] - } - ] - } - ] - }, - "span": 101 - }, - { - "kind": { - "Assign": [ - { - "local": 5, - "projection": [] - }, - { - "Cast": [ - { - "PointerCoercion": "Unsize" - }, { - "Copy": { - "local": 6, - "projection": [] + "Mut": { + "kind": "Default" } }, - 42 + { + "local": 1, + "projection": [] + } ] } ] - }, - "span": 101 + } } ], "terminator": { @@ -2535,54 +2744,13 @@ "args": [ { "Move": { - "local": 2, + "local": 3, "projection": [] } }, - { - "Constant": { - "const_": { - "id": 13, - "kind": { - "Allocated": { - "align": 8, - "bytes": [ - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 4, - 0, - 0, - 0, - 0, - 0, - 0, - 0 - ], - "mutability": "Mut", - "provenance": { - "ptrs": [ - [ - 0, - 0 - ] - ] - } - } - } - }, - "span": 100, - "user_ty": null - } - }, { "Move": { - "local": 5, + "local": 2, "projection": [] } } @@ -2594,311 +2762,38 @@ "func": { "Constant": { "const_": { - "id": 12, "kind": "ZeroSized" }, - "span": 100, - "user_ty": 1 + "user_ty": null } }, - "target": 4, - "unwind": "Continue" + "target": 1, + "unwind": { + "Cleanup": 3 + } } - }, - "span": 100 + } } }, { "statements": [], "terminator": { "kind": { - "Call": { - "args": [ - { - "Move": { - "local": 2, - "projection": [] - } - }, - { - "Constant": { - "const_": { - "id": 15, - "kind": { - "Allocated": { - "align": 8, - "bytes": [ - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 4, - 0, - 0, - 0, - 0, - 0, - 0, - 0 - ], - "mutability": "Mut", - "provenance": { - "ptrs": [ - [ - 0, - 1 - ] - ] - } - } - } - }, - "span": 100, - "user_ty": null - } - } - ], - "destination": { - "local": 0, - "projection": [] - }, - "func": { - "Constant": { - "const_": { - "id": 14, - "kind": "ZeroSized" - }, - "span": 100, - "user_ty": 0 - } - }, - "target": 5, - "unwind": "Continue" - } - }, - "span": 100 - } - }, - { - "statements": [ - { - "kind": { - "StorageDead": 5 - }, - "span": 102 - }, - { - "kind": { - "StorageDead": 4 - }, - "span": 102 - } - ], - "terminator": { - "kind": { - "Goto": { - "target": 5 - } - }, - "span": 102 - } - }, - { - "statements": [], - "terminator": { - "kind": "Return", - "span": 103 - } - } - ], - "locals": [ - { - "mutability": "Mut", - "span": 100 - }, - { - "mutability": "Not", - "span": 100 - }, - { - "mutability": "Not", - "span": 100 - }, - { - "mutability": "Mut", - "span": 100 - }, - { - "mutability": "Not", - "span": 101 - }, - { - "mutability": "Mut", - "span": 101 - }, - { - "mutability": "Not", - "span": 101 - } - ], - "span": 100, - "spread_arg": null, - "var_debug_info": [ - { - "argument_index": 1, - "composite": null, - "name": "self", - "source_info": { - "scope": 0, - "span": 100 - }, - "value": { - "Place": { - "local": 1, - "projection": [] - } - } - }, - { - "argument_index": 2, - "composite": null, - "name": "f", - "source_info": { - "scope": 0, - "span": 100 - }, - "value": { - "Place": { - "local": 2, - "projection": [] - } - } - }, - { - "argument_index": null, - "composite": null, - "name": "__self_0", - "source_info": { - "scope": 1, - "span": 101 - }, - "value": { - "Place": { - "local": 4, - "projection": [] - } - } - } - ] - }, - "id": 12, - "name": " as std::fmt::Debug>::fmt" - } - }, - "symbol_name": "_ZN66_$LT$core..option..Option$LT$T$GT$$u20$as$u20$core..fmt..Debug$GT$3fmt17h" - }, - { - "details": null, - "mono_item_kind": { - "MonoItemFn": { - "body": { - "arg_count": 2, - "blocks": [ - { - "statements": [ - { - "kind": { - "Assign": [ - { - "local": 3, - "projection": [] - }, - { - "Ref": [ - { - "kind": "ReErased" - }, - { - "Mut": { - "kind": "Default" - } - }, - { - "local": 1, - "projection": [] - } - ] - } - ] - }, - "span": 67 - } - ], - "terminator": { - "kind": { - "Call": { - "args": [ - { - "Move": { - "local": 3, - "projection": [] - } - }, - { - "Move": { - "local": 2, - "projection": [] - } - } - ], - "destination": { - "local": 0, - "projection": [] - }, - "func": { - "Constant": { - "const_": { - "id": 8, - "kind": "ZeroSized" - }, - "span": 67, - "user_ty": null - } - }, - "target": 1, - "unwind": { - "Cleanup": 3 - } - } - }, - "span": 67 - } - }, - { - "statements": [], - "terminator": { - "kind": { - "Drop": { - "place": { - "local": 1, + "Drop": { + "place": { + "local": 1, "projection": [] }, "target": 2, "unwind": "Continue" } - }, - "span": 67 + } } }, { "statements": [], "terminator": { - "kind": "Return", - "span": 67 + "kind": "Return" } }, { @@ -2913,41 +2808,33 @@ "target": 4, "unwind": "Terminate" } - }, - "span": 67 + } } }, { "statements": [], "terminator": { - "kind": "Resume", - "span": 67 + "kind": "Resume" } } ], "locals": [ { - "mutability": "Mut", - "span": 67 + "mutability": "Mut" }, { - "mutability": "Not", - "span": 67 + "mutability": "Not" }, { - "mutability": "Not", - "span": 67 + "mutability": "Not" }, { - "mutability": "Not", - "span": 67 + "mutability": "Not" } ], - "span": 67, "spread_arg": 2, "var_debug_info": [] }, - "id": 6, "name": "<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once" } }, @@ -2958,388 +2845,147 @@ "mono_item_kind": { "MonoItemFn": { "body": { - "arg_count": 2, + "arg_count": 1, "blocks": [ - { - "statements": [ - { - "kind": { - "Assign": [ - { - "local": 3, - "projection": [] - }, - { - "Use": { - "Copy": { - "local": 1, - "projection": [ - "Deref" - ] - } - } - } - ] - }, - "span": 45 - } - ], - "terminator": { - "kind": { - "Call": { - "args": [ - { - "Move": { - "local": 3, - "projection": [] - } - }, - { - "Move": { - "local": 2, - "projection": [] - } - } - ], - "destination": { - "local": 0, - "projection": [] - }, - "func": { - "Constant": { - "const_": { - "id": 6, - "kind": "ZeroSized" - }, - "span": 43, - "user_ty": null - } - }, - "target": 1, - "unwind": "Continue" - } - }, - "span": 44 - } - }, { "statements": [], "terminator": { - "kind": "Return", - "span": 46 + "kind": "Return" } } ], "locals": [ { - "mutability": "Mut", - "span": 47 - }, - { - "mutability": "Not", - "span": 48 - }, - { - "mutability": "Not", - "span": 49 + "mutability": "Mut" }, { - "mutability": "Mut", - "span": 48 + "mutability": "Not" } ], - "span": 50, "spread_arg": null, - "var_debug_info": [ - { - "argument_index": 1, - "composite": null, - "name": "self", - "source_info": { - "scope": 0, - "span": 48 - }, - "value": { - "Place": { - "local": 1, - "projection": [] - } - } - }, - { - "argument_index": 2, - "composite": null, - "name": "f", - "source_info": { - "scope": 0, - "span": 49 - }, - "value": { - "Place": { - "local": 2, - "projection": [] - } - } - } - ] + "var_debug_info": [] }, - "id": 3, - "name": "<&std::option::Option as std::fmt::Debug>::fmt" + "name": "std::ptr::drop_in_place::<&u64>" } }, - "symbol_name": "_ZN42_$LT$$RF$T$u20$as$u20$core..fmt..Debug$GT$3fmt17h" + "symbol_name": "_ZN4core3ptr28drop_in_place$LT$$RF$u64$GT$17h" }, { "details": null, "mono_item_kind": { "MonoItemFn": { "body": { - "arg_count": 2, + "arg_count": 1, "blocks": [ - { - "statements": [ - { - "kind": { - "Assign": [ - { - "local": 5, - "projection": [] - }, - { - "Discriminant": { - "local": 1, - "projection": [ - "Deref" - ] - } - } - ] - }, - "span": 105 - } - ], - "terminator": { - "kind": { - "SwitchInt": { - "discr": { - "Move": { - "local": 5, - "projection": [] - } - }, - "targets": { - "branches": [ - [ - 0, - 3 - ], - [ - 1, - 2 - ] - ], - "otherwise": 1 - } - } - }, - "span": 104 - } - }, { "statements": [], "terminator": { - "kind": "Unreachable", - "span": 105 + "kind": "Return" } - }, + } + ], + "locals": [ { - "statements": [ - { - "kind": { - "Assign": [ - { - "local": 3, - "projection": [] - }, - { - "Discriminant": { - "local": 2, - "projection": [ - "Deref" - ] - } - } - ] - }, - "span": 105 - } - ], - "terminator": { - "kind": { - "SwitchInt": { - "discr": { - "Move": { - "local": 3, - "projection": [] - } - }, - "targets": { - "branches": [ - [ - 0, - 6 - ], - [ - 1, - 7 - ] - ], - "otherwise": 1 - } - } - }, - "span": 104 - } + "mutability": "Mut" }, { - "statements": [ - { - "kind": { - "Assign": [ - { - "local": 4, - "projection": [] - }, - { - "Discriminant": { - "local": 2, - "projection": [ - "Deref" - ] - } - } - ] - }, - "span": 105 - } - ], - "terminator": { - "kind": { - "SwitchInt": { - "discr": { - "Move": { - "local": 4, - "projection": [] - } - }, - "targets": { - "branches": [ - [ - 0, - 4 - ], - [ - 1, - 5 - ] - ], - "otherwise": 1 - } - } - }, - "span": 104 - } - }, + "mutability": "Not" + } + ], + "spread_arg": null, + "var_debug_info": [] + }, + "name": "std::ptr::drop_in_place::<&std::option::Option>" + } + }, + "symbol_name": "_ZN4core3ptr56drop_in_place$LT$$RF$core..option..Option$LT$u64$GT$$GT$17h" + }, + { + "details": null, + "mono_item_kind": { + "MonoItemFn": { + "body": { + "arg_count": 1, + "blocks": [ { - "statements": [ - { - "kind": { - "Assign": [ - { - "local": 0, - "projection": [] - }, - { - "Use": { - "Constant": { - "const_": { - "id": 16, - "kind": { - "Allocated": { - "align": 1, - "bytes": [ - 1 - ], - "mutability": "Mut", - "provenance": { - "ptrs": [] - } - } - } - }, - "span": 106, - "user_ty": null - } - } - } - ] - }, - "span": 106 - } - ], + "statements": [], "terminator": { - "kind": { - "Goto": { - "target": 8 - } - }, - "span": 106 + "kind": "Return" } + } + ], + "locals": [ + { + "mutability": "Mut" }, + { + "mutability": "Not" + } + ], + "spread_arg": null, + "var_debug_info": [] + }, + "name": "std::ptr::drop_in_place::<{closure@std::rt::lang_start<()>::{closure#0}}>" + } + }, + "symbol_name": "_ZN4core3ptr85drop_in_place$LT$std..rt..lang_start$LT$$LP$$RP$$GT$..$u7b$$u7b$closure$u7d$$u7d$$GT$17h" + }, + { + "details": null, + "mono_item_kind": { + "MonoItemFn": { + "body": { + "arg_count": 2, + "blocks": [ { "statements": [ { "kind": { "Assign": [ { - "local": 0, + "local": 3, "projection": [] }, { - "Use": { - "Constant": { - "const_": { - "id": 17, - "kind": { - "Allocated": { - "align": 1, - "bytes": [ - 0 - ], - "mutability": "Mut", - "provenance": { - "ptrs": [] - } - } - } - }, - "span": 107, - "user_ty": null - } + "Discriminant": { + "local": 1, + "projection": [] } } ] - }, - "span": 107 + } } ], "terminator": { "kind": { - "Goto": { - "target": 8 + "SwitchInt": { + "discr": { + "Move": { + "local": 3, + "projection": [] + } + }, + "targets": { + "branches": [ + [ + 0, + 2 + ], + [ + 1, + 3 + ] + ], + "otherwise": 1 + } } - }, - "span": 107 + } + } + }, + { + "statements": [], + "terminator": { + "kind": "Unreachable" } }, { @@ -3352,40 +2998,38 @@ "projection": [] }, { - "Use": { - "Constant": { - "const_": { - "id": 17, - "kind": { - "Allocated": { - "align": 1, - "bytes": [ - 0 - ], - "mutability": "Mut", - "provenance": { - "ptrs": [] - } + "Aggregate": [ + { + "Adt": [ + 0, + 0, + [ + { + "Type": 0 } - } - }, - "span": 108, - "user_ty": null - } - } + ], + null, + null + ] + }, + [] + ] } ] - }, - "span": 108 + } } ], "terminator": { "kind": { - "Goto": { - "target": 8 + "Drop": { + "place": { + "local": 2, + "projection": [] + }, + "target": 5, + "unwind": "Continue" } - }, - "span": 108 + } } }, { @@ -3394,69 +3038,85 @@ "kind": { "Assign": [ { - "local": 6, + "local": 4, "projection": [] }, { - "Ref": [ - { - "kind": "ReErased" - }, - "Shared", - { + "Use": { + "Move": { "local": 1, "projection": [ - "Deref", { "Downcast": 1 }, { "Field": [ 0, - 28 + 0 ] } ] } - ] + } } ] - }, - "span": 110 + } + }, + { + "kind": { + "StorageLive": 5 + } + }, + { + "kind": { + "StorageLive": 6 + } }, { "kind": { "Assign": [ { - "local": 7, + "local": 6, "projection": [] }, { - "Ref": [ - { - "kind": "ReErased" - }, - "Shared", - { + "Use": { + "Move": { "local": 2, - "projection": [ - "Deref", - { - "Downcast": 1 - }, - { - "Field": [ - 0, - 28 - ] - } - ] + "projection": [] } + } + } + ] + } + }, + { + "kind": { + "StorageLive": 7 + } + }, + { + "kind": { + "Assign": [ + { + "local": 7, + "projection": [] + }, + { + "Aggregate": [ + "Tuple", + [ + { + "Copy": { + "local": 4, + "projection": [] + } + } + ] ] } ] - }, - "span": 111 + } } ], "terminator": { @@ -3477,69 +3137,117 @@ } ], "destination": { - "local": 0, + "local": 5, "projection": [] }, "func": { "Constant": { "const_": { - "id": 18, "kind": "ZeroSized" }, - "span": 109, "user_ty": null } }, - "target": 8, + "target": 4, "unwind": "Continue" } - }, - "span": 109 + } + } + }, + { + "statements": [ + { + "kind": { + "StorageDead": 7 + } + }, + { + "kind": { + "StorageDead": 6 + } + }, + { + "kind": { + "Assign": [ + { + "local": 0, + "projection": [] + }, + { + "Aggregate": [ + { + "Adt": [ + 0, + 1, + [ + { + "Type": 0 + } + ], + null, + null + ] + }, + [ + { + "Move": { + "local": 5, + "projection": [] + } + } + ] + ] + } + ] + } + }, + { + "kind": { + "StorageDead": 5 + } + } + ], + "terminator": { + "kind": { + "Goto": { + "target": 5 + } + } } }, { "statements": [], "terminator": { - "kind": "Return", - "span": 112 + "kind": "Return" } } ], "locals": [ { - "mutability": "Mut", - "span": 113 + "mutability": "Mut" }, { - "mutability": "Not", - "span": 114 + "mutability": "Not" }, { - "mutability": "Not", - "span": 115 + "mutability": "Not" }, { - "mutability": "Mut", - "span": 116 + "mutability": "Mut" }, { - "mutability": "Mut", - "span": 117 + "mutability": "Not" }, { - "mutability": "Mut", - "span": 118 + "mutability": "Mut" }, { - "mutability": "Not", - "span": 110 + "mutability": "Mut" }, { - "mutability": "Not", - "span": 111 + "mutability": "Mut" } ], - "span": 119, "spread_arg": null, "var_debug_info": [ { @@ -3547,8 +3255,7 @@ "composite": null, "name": "self", "source_info": { - "scope": 0, - "span": 114 + "scope": 0 }, "value": { "Place": { @@ -3560,10 +3267,9 @@ { "argument_index": 2, "composite": null, - "name": "other", + "name": "f", "source_info": { - "scope": 0, - "span": 115 + "scope": 0 }, "value": { "Place": { @@ -3575,183 +3281,221 @@ { "argument_index": null, "composite": null, - "name": "l", - "source_info": { - "scope": 1, - "span": 110 - }, - "value": { - "Place": { - "local": 6, - "projection": [] - } - } - }, - { - "argument_index": null, - "composite": null, - "name": "r", + "name": "x", "source_info": { - "scope": 1, - "span": 111 + "scope": 1 }, "value": { "Place": { - "local": 7, + "local": 4, "projection": [] } } } ] }, - "id": 13, - "name": " as std::cmp::PartialEq>::eq" + "name": "std::option::Option::<[u8; 8]>::map:: u64 {core::num::::from_le_bytes}>" } }, - "symbol_name": "_ZN70_$LT$core..option..Option$LT$T$GT$$u20$as$u20$core..cmp..PartialEq$GT$2eq17h" + "symbol_name": "_ZN4core6option15Option$LT$T$GT$3map17h" }, { "details": null, "mono_item_kind": { "MonoItemFn": { "body": { - "arg_count": 2, + "arg_count": 4, "blocks": [ { "statements": [ { "kind": { - "StorageLive": 3 - }, - "span": 52 + "StorageLive": 5 + } }, { "kind": { "Assign": [ { - "local": 3, + "local": 6, "projection": [] }, { - "Use": { - "Copy": { - "local": 1, - "projection": [ - "Deref" - ] + "Ref": [ + { + "kind": "ReErased" + }, + "Shared", + { + "local": 2, + "projection": [] } - } + ] } ] - }, - "span": 52 + } }, { "kind": { - "StorageLive": 4 - }, - "span": 53 + "Assign": [ + { + "local": 5, + "projection": [] + }, + { + "Cast": [ + { + "PointerCoercion": "Unsize" + }, + { + "Copy": { + "local": 6, + "projection": [] + } + }, + 0 + ] + } + ] + } + }, + { + "kind": { + "StorageLive": 7 + } }, { "kind": { "Assign": [ { - "local": 4, + "local": 8, "projection": [] }, { - "Use": { - "Copy": { - "local": 2, - "projection": [ - "Deref" - ] + "Ref": [ + { + "kind": "ReErased" + }, + "Shared", + { + "local": 3, + "projection": [] } - } + ] } ] - }, - "span": 53 + } }, { "kind": { "Assign": [ { - "local": 0, + "local": 7, "projection": [] }, { - "BinaryOp": [ - "Eq", + "Cast": [ { - "Move": { - "local": 3, - "projection": [] - } + "PointerCoercion": "Unsize" }, { - "Move": { - "local": 4, + "Copy": { + "local": 8, "projection": [] } - } + }, + 0 ] } ] - }, - "span": 54 - }, - { - "kind": { - "StorageDead": 4 - }, - "span": 55 - }, - { - "kind": { - "StorageDead": 3 - }, - "span": 55 + } } ], "terminator": { - "kind": "Return", - "span": 51 + "kind": { + "Call": { + "args": [ + { + "Move": { + "local": 1, + "projection": [] + } + }, + { + "Move": { + "local": 5, + "projection": [] + } + }, + { + "Move": { + "local": 7, + "projection": [] + } + }, + { + "Move": { + "local": 4, + "projection": [] + } + } + ], + "destination": { + "local": 0, + "projection": [] + }, + "func": { + "Constant": { + "const_": { + "kind": "ZeroSized" + }, + "user_ty": null + } + }, + "target": null, + "unwind": "Continue" + } + } } } ], "locals": [ { - "mutability": "Mut", - "span": 56 + "mutability": "Mut" + }, + { + "mutability": "Not" + }, + { + "mutability": "Not" + }, + { + "mutability": "Not" }, { - "mutability": "Not", - "span": 57 + "mutability": "Not" }, { - "mutability": "Not", - "span": 58 + "mutability": "Mut" }, { - "mutability": "Mut", - "span": 52 + "mutability": "Not" }, { - "mutability": "Mut", - "span": 53 + "mutability": "Mut" + }, + { + "mutability": "Not" } ], - "span": 59, "spread_arg": null, "var_debug_info": [ { "argument_index": 1, "composite": null, - "name": "self", + "name": "kind", "source_info": { - "scope": 0, - "span": 57 + "scope": 0 }, "value": { "Place": { @@ -3763,10 +3507,9 @@ { "argument_index": 2, "composite": null, - "name": "other", + "name": "left", "source_info": { - "scope": 0, - "span": 58 + "scope": 0 }, "value": { "Place": { @@ -3774,89 +3517,214 @@ "projection": [] } } + }, + { + "argument_index": 3, + "composite": null, + "name": "right", + "source_info": { + "scope": 0 + }, + "value": { + "Place": { + "local": 3, + "projection": [] + } + } + }, + { + "argument_index": 4, + "composite": null, + "name": "args", + "source_info": { + "scope": 0 + }, + "value": { + "Place": { + "local": 4, + "projection": [] + } + } + } + ] + }, + "name": "core::panicking::assert_failed::, std::option::Option>" + } + }, + "symbol_name": "_ZN4core9panicking13assert_failed17h" + }, + { + "details": null, + "mono_item_kind": { + "MonoItemFn": { + "body": { + "arg_count": 1, + "blocks": [ + { + "statements": [ + { + "kind": { + "Assign": [ + { + "local": 0, + "projection": [] + }, + { + "Use": { + "Constant": { + "const_": { + "kind": { + "Allocated": { + "align": 1, + "bytes": [ + 0 + ], + "mutability": "Mut", + "provenance": { + "ptrs": [] + } + } + } + }, + "user_ty": null + } + } + } + ] + } + } + ], + "terminator": { + "kind": "Return" + } } - ] + ], + "locals": [ + { + "mutability": "Mut" + }, + { + "mutability": "Not" + } + ], + "spread_arg": null, + "var_debug_info": [] }, - "id": 4, - "name": "std::cmp::impls::::eq" + "name": "<() as std::process::Termination>::report" } }, - "symbol_name": "_ZN4core3cmp5impls54_$LT$impl$u20$core..cmp..PartialEq$u20$for$u20$u64$GT$2eq17h" + "symbol_name": "_ZN54_$LT$$LP$$RP$$u20$as$u20$std..process..Termination$GT$6report17h" }, { "details": null, "mono_item_kind": { "MonoItemFn": { "body": { - "arg_count": 4, + "arg_count": 2, "blocks": [ { "statements": [ { "kind": { - "StorageLive": 5 - }, - "span": 1 - }, - { - "kind": { - "StorageLive": 6 - }, - "span": 2 - }, + "Assign": [ + { + "local": 3, + "projection": [] + }, + { + "Discriminant": { + "local": 1, + "projection": [ + "Deref" + ] + } + } + ] + } + } + ], + "terminator": { + "kind": { + "SwitchInt": { + "discr": { + "Move": { + "local": 3, + "projection": [] + } + }, + "targets": { + "branches": [ + [ + 0, + 3 + ], + [ + 1, + 2 + ] + ], + "otherwise": 1 + } + } + } + } + }, + { + "statements": [], + "terminator": { + "kind": "Unreachable" + } + }, + { + "statements": [ { "kind": { - "StorageLive": 8 - }, - "span": 3 + "StorageLive": 4 + } }, { "kind": { "Assign": [ { - "local": 8, + "local": 4, "projection": [] }, { - "Aggregate": [ + "Ref": [ { - "Closure": [ - 1, - [ - { - "Type": 1 - }, - { - "Type": 2 - }, - { - "Type": 3 - }, - { - "Type": 4 - } - ] - ] + "kind": "ReErased" }, - [ - { - "Copy": { - "local": 1, - "projection": [] + "Shared", + { + "local": 1, + "projection": [ + "Deref", + { + "Downcast": 1 + }, + { + "Field": [ + 0, + 0 + ] } - } - ] + ] + } ] } ] - }, - "span": 3 + } + }, + { + "kind": { + "StorageLive": 5 + } }, { "kind": { "Assign": [ { - "local": 7, + "local": 6, "projection": [] }, { @@ -3866,20 +3734,19 @@ }, "Shared", { - "local": 8, + "local": 4, "projection": [] } ] } ] - }, - "span": 2 + } }, { "kind": { "Assign": [ { - "local": 6, + "local": 5, "projection": [] }, { @@ -3889,16 +3756,15 @@ }, { "Copy": { - "local": 7, + "local": 6, "projection": [] } }, - 5 + 0 ] } ] - }, - "span": 2 + } } ], "terminator": { @@ -3907,154 +3773,203 @@ "args": [ { "Move": { - "local": 6, + "local": 2, "projection": [] } }, { - "Move": { - "local": 2, - "projection": [] + "Constant": { + "const_": { + "kind": { + "Allocated": { + "align": 8, + "bytes": [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 4, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "mutability": "Mut", + "provenance": { + "ptrs": [ + [ + 0, + 0 + ] + ] + } + } + } + }, + "user_ty": null } }, { "Move": { - "local": 3, + "local": 5, "projection": [] } - }, + } + ], + "destination": { + "local": 0, + "projection": [] + }, + "func": { + "Constant": { + "const_": { + "kind": "ZeroSized" + }, + "user_ty": 1 + } + }, + "target": 4, + "unwind": "Continue" + } + } + } + }, + { + "statements": [], + "terminator": { + "kind": { + "Call": { + "args": [ { "Move": { - "local": 4, + "local": 2, "projection": [] } + }, + { + "Constant": { + "const_": { + "kind": { + "Allocated": { + "align": 8, + "bytes": [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 4, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "mutability": "Mut", + "provenance": { + "ptrs": [ + [ + 0, + 1 + ] + ] + } + } + } + }, + "user_ty": null + } } ], "destination": { - "local": 5, + "local": 0, "projection": [] }, "func": { "Constant": { "const_": { - "id": 0, "kind": "ZeroSized" }, - "span": 0, - "user_ty": null + "user_ty": 0 } }, - "target": 1, + "target": 5, "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 + "StorageDead": 5 + } }, { "kind": { - "StorageDead": 5 - }, - "span": 7 + "StorageDead": 4 + } } ], "terminator": { - "kind": "Return", - "span": 4 + "kind": { + "Goto": { + "target": 5 + } + } + } + }, + { + "statements": [], + "terminator": { + "kind": "Return" } } ], "locals": [ { - "mutability": "Mut", - "span": 8 + "mutability": "Mut" }, { - "mutability": "Not", - "span": 9 + "mutability": "Not" }, { - "mutability": "Not", - "span": 10 + "mutability": "Not" }, { - "mutability": "Not", - "span": 11 + "mutability": "Mut" }, { - "mutability": "Not", - "span": 12 + "mutability": "Not" }, { - "mutability": "Mut", - "span": 1 + "mutability": "Mut" }, { - "mutability": "Mut", - "span": 2 - }, - { - "mutability": "Not", - "span": 2 - }, - { - "mutability": "Not", - "span": 3 + "mutability": "Not" } ], - "span": 13, "spread_arg": null, "var_debug_info": [ { "argument_index": 1, "composite": null, - "name": "main", + "name": "self", "source_info": { - "scope": 0, - "span": 9 + "scope": 0 }, "value": { "Place": { @@ -4066,10 +3981,9 @@ { "argument_index": 2, "composite": null, - "name": "argc", + "name": "f", "source_info": { - "scope": 0, - "span": 10 + "scope": 0 }, "value": { "Place": { @@ -4078,133 +3992,259 @@ } } }, - { - "argument_index": 3, - "composite": null, - "name": "argv", - "source_info": { - "scope": 0, - "span": 11 - }, - "value": { - "Place": { - "local": 3, - "projection": [] - } - } - }, - { - "argument_index": 4, - "composite": null, - "name": "sigpipe", - "source_info": { - "scope": 0, - "span": 12 - }, - "value": { - "Place": { - "local": 4, - "projection": [] - } - } - }, { "argument_index": null, "composite": null, - "name": "v", + "name": "__self_0", "source_info": { - "scope": 1, - "span": 6 + "scope": 1 }, "value": { "Place": { - "local": 0, + "local": 4, "projection": [] } } } ] }, - "id": 0, - "name": "std::rt::lang_start::<()>" + "name": " as std::fmt::Debug>::fmt" } }, - "symbol_name": "_ZN3std2rt10lang_start17h" + "symbol_name": "_ZN66_$LT$core..option..Option$LT$T$GT$$u20$as$u20$core..fmt..Debug$GT$3fmt17h" }, { "details": null, "mono_item_kind": { "MonoItemFn": { "body": { - "arg_count": 4, + "arg_count": 2, "blocks": [ { "statements": [ { "kind": { - "StorageLive": 5 - }, - "span": 87 - }, + "Assign": [ + { + "local": 5, + "projection": [] + }, + { + "Discriminant": { + "local": 1, + "projection": [ + "Deref" + ] + } + } + ] + } + } + ], + "terminator": { + "kind": { + "SwitchInt": { + "discr": { + "Move": { + "local": 5, + "projection": [] + } + }, + "targets": { + "branches": [ + [ + 0, + 3 + ], + [ + 1, + 2 + ] + ], + "otherwise": 1 + } + } + } + } + }, + { + "statements": [], + "terminator": { + "kind": "Unreachable" + } + }, + { + "statements": [ { "kind": { "Assign": [ { - "local": 6, + "local": 3, "projection": [] }, { - "Ref": [ - { - "kind": "ReErased" - }, - "Shared", - { - "local": 2, - "projection": [] - } + "Discriminant": { + "local": 2, + "projection": [ + "Deref" + ] + } + } + ] + } + } + ], + "terminator": { + "kind": { + "SwitchInt": { + "discr": { + "Move": { + "local": 3, + "projection": [] + } + }, + "targets": { + "branches": [ + [ + 0, + 4 + ], + [ + 1, + 5 ] + ], + "otherwise": 1 + } + } + } + } + }, + { + "statements": [ + { + "kind": { + "Assign": [ + { + "local": 4, + "projection": [] + }, + { + "Discriminant": { + "local": 2, + "projection": [ + "Deref" + ] + } } ] - }, - "span": 87 + } }, { "kind": { "Assign": [ { - "local": 5, + "local": 0, "projection": [] }, { - "Cast": [ - { - "PointerCoercion": "Unsize" - }, + "BinaryOp": [ + "Eq", { "Copy": { - "local": 6, + "local": 4, "projection": [] } }, - 42 + { + "Constant": { + "const_": { + "kind": { + "Allocated": { + "align": 8, + "bytes": [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "mutability": "Mut", + "provenance": { + "ptrs": [] + } + } + } + }, + "user_ty": null + } + } ] } ] - }, - "span": 87 - }, - { - "kind": { - "StorageLive": 7 - }, - "span": 88 - }, + } + } + ], + "terminator": { + "kind": { + "Goto": { + "target": 6 + } + } + } + }, + { + "statements": [ + { + "kind": { + "Assign": [ + { + "local": 0, + "projection": [] + }, + { + "Use": { + "Constant": { + "const_": { + "kind": { + "Allocated": { + "align": 1, + "bytes": [ + 0 + ], + "mutability": "Mut", + "provenance": { + "ptrs": [] + } + } + } + }, + "user_ty": null + } + } + } + ] + } + } + ], + "terminator": { + "kind": { + "Goto": { + "target": 6 + } + } + } + }, + { + "statements": [ { "kind": { "Assign": [ { - "local": 8, + "local": 6, "projection": [] }, { @@ -4214,14 +4254,24 @@ }, "Shared", { - "local": 3, - "projection": [] + "local": 1, + "projection": [ + "Deref", + { + "Downcast": 1 + }, + { + "Field": [ + 0, + 0 + ] + } + ] } ] } ] - }, - "span": 88 + } }, { "kind": { @@ -4231,22 +4281,30 @@ "projection": [] }, { - "Cast": [ + "Ref": [ { - "PointerCoercion": "Unsize" + "kind": "ReErased" }, + "Shared", { - "Copy": { - "local": 8, - "projection": [] - } - }, - 42 + "local": 2, + "projection": [ + "Deref", + { + "Downcast": 1 + }, + { + "Field": [ + 0, + 0 + ] + } + ] + } ] } ] - }, - "span": 88 + } } ], "terminator": { @@ -4255,13 +4313,7 @@ "args": [ { "Move": { - "local": 1, - "projection": [] - } - }, - { - "Move": { - "local": 5, + "local": 6, "projection": [] } }, @@ -4270,12 +4322,6 @@ "local": 7, "projection": [] } - }, - { - "Move": { - "local": 4, - "projection": [] - } } ], "destination": { @@ -4285,69 +4331,58 @@ "func": { "Constant": { "const_": { - "id": 10, "kind": "ZeroSized" }, - "span": 85, "user_ty": null } }, - "target": null, + "target": 6, "unwind": "Continue" } - }, - "span": 86 + } + } + }, + { + "statements": [], + "terminator": { + "kind": "Return" } } ], "locals": [ { - "mutability": "Mut", - "span": 89 - }, - { - "mutability": "Not", - "span": 90 + "mutability": "Mut" }, { - "mutability": "Not", - "span": 91 + "mutability": "Not" }, { - "mutability": "Not", - "span": 92 + "mutability": "Not" }, { - "mutability": "Not", - "span": 93 + "mutability": "Mut" }, { - "mutability": "Mut", - "span": 87 + "mutability": "Mut" }, { - "mutability": "Not", - "span": 87 + "mutability": "Mut" }, { - "mutability": "Mut", - "span": 88 + "mutability": "Not" }, { - "mutability": "Not", - "span": 88 + "mutability": "Not" } ], - "span": 94, "spread_arg": null, "var_debug_info": [ { "argument_index": 1, "composite": null, - "name": "kind", + "name": "self", "source_info": { - "scope": 0, - "span": 90 + "scope": 0 }, "value": { "Place": { @@ -4359,10 +4394,9 @@ { "argument_index": 2, "composite": null, - "name": "left", + "name": "other", "source_info": { - "scope": 0, - "span": 91 + "scope": 0 }, "value": { "Place": { @@ -4372,42 +4406,39 @@ } }, { - "argument_index": 3, + "argument_index": null, "composite": null, - "name": "right", + "name": "l", "source_info": { - "scope": 0, - "span": 92 + "scope": 1 }, "value": { "Place": { - "local": 3, + "local": 6, "projection": [] } } }, { - "argument_index": 4, + "argument_index": null, "composite": null, - "name": "args", + "name": "r", "source_info": { - "scope": 0, - "span": 93 + "scope": 1 }, "value": { "Place": { - "local": 4, + "local": 7, "projection": [] } } } ] }, - "id": 10, - "name": "core::panicking::assert_failed::, std::option::Option>" + "name": " as std::cmp::PartialEq>::eq" } }, - "symbol_name": "_ZN4core9panicking13assert_failed17h" + "symbol_name": "_ZN70_$LT$core..option..Option$LT$T$GT$$u20$as$u20$core..cmp..PartialEq$GT$2eq17h" } ], "types": [ @@ -4914,7 +4945,136 @@ } }, "size": { - "num_bits": 128 + "num_bits": 128 + }, + "variants": { + "Single": { + "index": 1 + } + } + }, + { + "abi": { + "Aggregate": { + "sized": true + } + }, + "abi_align": 1, + "fields": { + "Arbitrary": { + "offsets": [] + } + }, + "size": { + "num_bits": 64 + }, + "variants": { + "Single": { + "index": 2 + } + } + } + ] + } + } + }, + "name": "core::fmt::rt::Count" + } + } + ], + [ + { + "EnumType": { + "discriminants": [ + 0, + 1, + 2 + ], + "fields": "elided", + "layout": { + "abi": { + "Scalar": { + "Initialized": { + "valid_range": { + "end": 2, + "start": 0 + }, + "value": { + "Int": { + "length": "I8", + "signed": false + } + } + } + } + }, + "abi_align": 1, + "fields": { + "Arbitrary": { + "offsets": [ + { + "num_bits": 0 + } + ] + } + }, + "size": { + "num_bits": 8 + }, + "variants": { + "Multiple": { + "tag": { + "Initialized": { + "valid_range": { + "end": 2, + "start": 0 + }, + "value": { + "Int": { + "length": "I8", + "signed": false + } + } + } + }, + "tag_encoding": "Direct", + "tag_field": 0, + "variants": [ + { + "abi": { + "Aggregate": { + "sized": true + } + }, + "abi_align": 1, + "fields": { + "Arbitrary": { + "offsets": [] + } + }, + "size": { + "num_bits": 8 + }, + "variants": { + "Single": { + "index": 0 + } + } + }, + { + "abi": { + "Aggregate": { + "sized": true + } + }, + "abi_align": 1, + "fields": { + "Arbitrary": { + "offsets": [] + } + }, + "size": { + "num_bits": 8 }, "variants": { "Single": { @@ -4935,7 +5095,7 @@ } }, "size": { - "num_bits": 64 + "num_bits": 8 }, "variants": { "Single": { @@ -4947,7 +5107,7 @@ } } }, - "name": "core::fmt::rt::Count" + "name": "core::panicking::AssertKind" } } ], @@ -5076,7 +5236,7 @@ } } }, - "name": "core::panicking::AssertKind" + "name": "std::fmt::Alignment" } } ], @@ -5330,6 +5490,137 @@ } } ], + [ + { + "EnumType": { + "discriminants": [ + 0, + 1 + ], + "fields": "elided", + "layout": { + "abi": { + "Scalar": { + "Initialized": { + "valid_range": { + "end": 3, + "start": 0 + }, + "value": { + "Int": { + "length": "I8", + "signed": false + } + } + } + } + }, + "abi_align": 1, + "fields": { + "Arbitrary": { + "offsets": [ + { + "num_bits": 0 + } + ] + } + }, + "size": { + "num_bits": 8 + }, + "variants": { + "Multiple": { + "tag": { + "Initialized": { + "valid_range": { + "end": 3, + "start": 0 + }, + "value": { + "Int": { + "length": "I8", + "signed": false + } + } + } + }, + "tag_encoding": { + "Niche": { + "niche_start": 3, + "niche_variants": { + "end": 0, + "start": 0 + }, + "untagged_variant": 1 + } + }, + "tag_field": 0, + "variants": [ + { + "abi": { + "Aggregate": { + "sized": true + } + }, + "abi_align": 1, + "fields": { + "Arbitrary": { + "offsets": [] + } + }, + "size": { + "num_bits": 0 + }, + "variants": { + "Single": { + "index": 0 + } + } + }, + { + "abi": { + "Scalar": { + "Initialized": { + "valid_range": { + "end": 2, + "start": 0 + }, + "value": { + "Int": { + "length": "I8", + "signed": false + } + } + } + } + }, + "abi_align": 1, + "fields": { + "Arbitrary": { + "offsets": [ + { + "num_bits": 0 + } + ] + } + }, + "size": { + "num_bits": 8 + }, + "variants": { + "Single": { + "index": 1 + } + } + } + ] + } + } + }, + "name": "std::option::Option" + } + } + ], [ { "EnumType": { @@ -5865,54 +6156,6 @@ } } ], - [ - { - "EnumType": { - "discriminants": [ - 0, - 1 - ], - "fields": "elided", - "layout": { - "abi": { - "Scalar": { - "Initialized": { - "valid_range": { - "end": 18446744073709551615, - "start": 0 - }, - "value": { - "Int": { - "length": "I64", - "signed": true - } - } - } - } - }, - "abi_align": 8, - "fields": { - "Arbitrary": { - "offsets": [ - { - "num_bits": 0 - } - ] - } - }, - "size": { - "num_bits": 64 - }, - "variants": { - "Single": { - "index": 0 - } - } - }, - "name": "std::result::Result" - } - } - ], [ { "StructType": { @@ -6077,28 +6320,61 @@ "Arbitrary": { "offsets": [ { - "num_bits": 416 + "num_bits": 0 }, { "num_bits": 384 + } + ] + } + }, + "size": { + "num_bits": 512 + }, + "variants": { + "Single": { + "index": 0 + } + } + }, + "name": "std::fmt::Formatter<'_>" + } + } + ], + [ + { + "StructType": { + "fields": "elided", + "layout": { + "abi": { + "Aggregate": { + "sized": true + } + }, + "abi_align": 8, + "fields": { + "Arbitrary": { + "offsets": [ + { + "num_bits": 288 }, { - "num_bits": 448 + "num_bits": 256 }, { - "num_bits": 0 + "num_bits": 320 }, { - "num_bits": 128 + "num_bits": 0 }, { - "num_bits": 256 + "num_bits": 128 } ] } }, "size": { - "num_bits": 512 + "num_bits": 384 }, "variants": { "Single": { @@ -6106,7 +6382,7 @@ } } }, - "name": "std::fmt::Formatter<'_>" + "name": "std::fmt::FormattingOptions" } } ], @@ -7064,39 +7340,6 @@ } } ], - [ - { - "RefType": { - "layout": { - "abi": { - "Scalar": { - "Initialized": { - "valid_range": { - "end": 18446744073709551615, - "start": 1 - }, - "value": { - "Pointer": 0 - } - } - } - }, - "abi_align": 8, - "fields": "Primitive", - "size": { - "num_bits": 64 - }, - "variants": { - "Single": { - "index": 0 - } - } - }, - "mutability": "Not", - "pointee_type": "elided" - } - } - ], [ { "RefType": { diff --git a/tests/integration/programs/modulo.smir.json.expected b/tests/integration/expected/nightly-2025-03-01/modulo.smir.json.expected similarity index 79% rename from tests/integration/programs/modulo.smir.json.expected rename to tests/integration/expected/nightly-2025-03-01/modulo.smir.json.expected index 4f014287..73a49f65 100644 --- a/tests/integration/programs/modulo.smir.json.expected +++ b/tests/integration/expected/nightly-2025-03-01/modulo.smir.json.expected @@ -97,247 +97,82 @@ "mono_item_kind": { "MonoItemFn": { "body": { - "arg_count": 0, + "arg_count": 4, "blocks": [ { "statements": [ { "kind": { - "Assign": [ - { - "local": 2, - "projection": [] - }, - { - "BinaryOp": [ - "Eq", - { - "Constant": { - "const_": { - "id": 10, - "kind": { - "Allocated": { - "align": 4, - "bytes": [ - 10, - 0, - 0, - 0 - ], - "mutability": "Mut", - "provenance": { - "ptrs": [] - } - } - } - }, - "span": 52, - "user_ty": null - } - }, - { - "Constant": { - "const_": { - "id": 11, - "kind": { - "Allocated": { - "align": 4, - "bytes": [ - 0, - 0, - 0, - 0 - ], - "mutability": "Mut", - "provenance": { - "ptrs": [] - } - } - } - }, - "span": 51, - "user_ty": null - } - } - ] - } - ] - }, - "span": 51 - } - ], - "terminator": { - "kind": { - "Assert": { - "cond": { - "Move": { - "local": 2, - "projection": [] - } - }, - "expected": false, - "msg": { - "RemainderByZero": { - "Constant": { - "const_": { - "id": 9, - "kind": { - "Allocated": { - "align": 4, - "bytes": [ - 42, - 0, - 0, - 0 - ], - "mutability": "Mut", - "provenance": { - "ptrs": [] - } - } - } - }, - "span": 50, - "user_ty": null - } - } - }, - "target": 1, - "unwind": "Continue" + "StorageLive": 5 + } + }, + { + "kind": { + "StorageLive": 7 } }, - "span": 51 - } - }, - { - "statements": [ { "kind": { "Assign": [ { - "local": 3, + "local": 7, "projection": [] }, { - "BinaryOp": [ - "Eq", + "Aggregate": [ { - "Constant": { - "const_": { - "id": 10, - "kind": { - "Allocated": { - "align": 4, - "bytes": [ - 10, - 0, - 0, - 0 - ], - "mutability": "Mut", - "provenance": { - "ptrs": [] - } - } + "Closure": [ + 0, + [ + { + "Type": 0 + }, + { + "Type": 0 + }, + { + "Type": 0 + }, + { + "Type": 0 } - }, - "span": 52, - "user_ty": null - } + ] + ] }, - { - "Constant": { - "const_": { - "id": 12, - "kind": { - "Allocated": { - "align": 4, - "bytes": [ - 255, - 255, - 255, - 255 - ], - "mutability": "Mut", - "provenance": { - "ptrs": [] - } - } - } - }, - "span": 51, - "user_ty": null + [ + { + "Copy": { + "local": 1, + "projection": [] + } } - } + ] ] } ] - }, - "span": 51 + } }, { "kind": { "Assign": [ { - "local": 4, + "local": 6, "projection": [] }, { - "BinaryOp": [ - "Eq", + "Ref": [ { - "Constant": { - "const_": { - "id": 9, - "kind": { - "Allocated": { - "align": 4, - "bytes": [ - 42, - 0, - 0, - 0 - ], - "mutability": "Mut", - "provenance": { - "ptrs": [] - } - } - } - }, - "span": 50, - "user_ty": null - } + "kind": "ReErased" }, + "Shared", { - "Constant": { - "const_": { - "id": 13, - "kind": { - "Allocated": { - "align": 4, - "bytes": [ - 0, - 0, - 0, - 128 - ], - "mutability": "Mut", - "provenance": { - "ptrs": [] - } - } - } - }, - "span": 51, - "user_ty": null - } + "local": 7, + "projection": [] } ] } ] - }, - "span": 51 + } }, { "kind": { @@ -347,599 +182,178 @@ "projection": [] }, { - "BinaryOp": [ - "BitAnd", + "Cast": [ { - "Move": { - "local": 3, - "projection": [] - } + "PointerCoercion": "Unsize" }, { - "Move": { - "local": 4, + "Copy": { + "local": 6, "projection": [] } - } + }, + 0 ] } ] - }, - "span": 51 + } } ], "terminator": { "kind": { - "Assert": { - "cond": { - "Move": { - "local": 5, - "projection": [] - } - }, - "expected": false, - "msg": { - "Overflow": [ - "Rem", - { - "Constant": { - "const_": { - "id": 9, - "kind": { - "Allocated": { - "align": 4, - "bytes": [ - 42, - 0, - 0, - 0 - ], - "mutability": "Mut", - "provenance": { - "ptrs": [] - } - } - } - }, - "span": 50, - "user_ty": null - } - }, - { - "Constant": { - "const_": { - "id": 10, - "kind": { - "Allocated": { - "align": 4, - "bytes": [ - 10, - 0, - 0, - 0 - ], - "mutability": "Mut", - "provenance": { - "ptrs": [] - } - } - } - }, - "span": 52, - "user_ty": null - } + "Call": { + "args": [ + { + "Move": { + "local": 5, + "projection": [] } - ] - }, - "target": 2, - "unwind": "Continue" - } - }, - "span": 51 - } - }, - { - "statements": [ - { - "kind": { - "Assign": [ + }, { - "local": 1, - "projection": [] + "Move": { + "local": 2, + "projection": [] + } }, { - "BinaryOp": [ - "Rem", - { - "Constant": { - "const_": { - "id": 9, - "kind": { - "Allocated": { - "align": 4, - "bytes": [ - 42, - 0, - 0, - 0 - ], - "mutability": "Mut", - "provenance": { - "ptrs": [] - } - } - } - }, - "span": 50, - "user_ty": null - } - }, - { - "Constant": { - "const_": { - "id": 10, - "kind": { - "Allocated": { - "align": 4, - "bytes": [ - 10, - 0, - 0, - 0 - ], - "mutability": "Mut", - "provenance": { - "ptrs": [] - } - } - } - }, - "span": 52, - "user_ty": null - } - } - ] - } - ] - }, - "span": 51 - } - ], - "terminator": { - "kind": { - "SwitchInt": { - "discr": { - "Move": { - "local": 1, - "projection": [] - } - }, - "targets": { - "branches": [ - [ - 2, - 3 - ] - ], - "otherwise": 4 - } - } - }, - "span": 53 - } - }, - { - "statements": [], - "terminator": { - "kind": "Return", - "span": 54 - } - }, - { - "statements": [], - "terminator": { - "kind": { - "Call": { - "args": [ + "Move": { + "local": 3, + "projection": [] + } + }, { - "Constant": { - "const_": { - "id": 15, - "kind": { - "Allocated": { - "align": 8, - "bytes": [ - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 30, - 0, - 0, - 0, - 0, - 0, - 0, - 0 - ], - "mutability": "Mut", - "provenance": { - "ptrs": [ - [ - 0, - 0 - ] - ] - } - } - } - }, - "span": 32, - "user_ty": null + "Move": { + "local": 4, + "projection": [] } } ], "destination": { - "local": 6, + "local": 0, "projection": [] }, "func": { "Constant": { "const_": { - "id": 14, "kind": "ZeroSized" }, - "span": 55, "user_ty": null } }, - "target": null, + "target": 1, "unwind": "Continue" } + } + } + }, + { + "statements": [ + { + "kind": { + "StorageDead": 5 + } }, - "span": 55 + { + "kind": { + "StorageDead": 7 + } + } + ], + "terminator": { + "kind": "Return" } } ], "locals": [ { - "mutability": "Mut", - "span": 56 + "mutability": "Mut" + }, + { + "mutability": "Not" }, { - "mutability": "Mut", - "span": 51 + "mutability": "Not" }, { - "mutability": "Mut", - "span": 51 + "mutability": "Not" }, { - "mutability": "Mut", - "span": 51 + "mutability": "Not" }, { - "mutability": "Mut", - "span": 51 + "mutability": "Mut" }, { - "mutability": "Mut", - "span": 51 + "mutability": "Not" }, { - "mutability": "Mut", - "span": 55 + "mutability": "Not" } ], - "span": 57, "spread_arg": null, - "var_debug_info": [] - }, - "id": 6, - "name": "main" - } - }, - "symbol_name": "_ZN6modulo4main17h" - }, - { - "details": null, - "mono_item_kind": { - "MonoItemFn": { - "body": { - "arg_count": 1, - "blocks": [ + "var_debug_info": [ { - "statements": [], - "terminator": { - "kind": "Return", - "span": 44 + "argument_index": 1, + "composite": null, + "name": "main", + "source_info": { + "scope": 0 + }, + "value": { + "Place": { + "local": 1, + "projection": [] + } } - } - ], - "locals": [ + }, { - "mutability": "Mut", - "span": 44 + "argument_index": 2, + "composite": null, + "name": "argc", + "source_info": { + "scope": 0 + }, + "value": { + "Place": { + "local": 2, + "projection": [] + } + } }, { - "mutability": "Not", - "span": 44 - } - ], - "span": 44, - "spread_arg": null, - "var_debug_info": [] - }, - "id": 4, - "name": "std::ptr::drop_in_place::<{closure@std::rt::lang_start<()>::{closure#0}}>" - } - }, - "symbol_name": "_ZN4core3ptr85drop_in_place$LT$std..rt..lang_start$LT$$LP$$RP$$GT$..$u7b$$u7b$closure$u7d$$u7d$$GT$17h" - }, - { - "details": null, - "mono_item_kind": { - "MonoItemFn": { - "body": { - "arg_count": 1, - "blocks": [ - { - "statements": [], - "terminator": { - "kind": { - "Call": { - "args": [ - { - "Move": { - "local": 1, - "projection": [] - } - }, - { - "Constant": { - "const_": { - "id": 4, - "kind": "ZeroSized" - }, - "span": 32, - "user_ty": null - } - } - ], - "destination": { - "local": 0, - "projection": [] - }, - "func": { - "Constant": { - "const_": { - "id": 3, - "kind": "ZeroSized" - }, - "span": 31, - "user_ty": null - } - }, - "target": 1, - "unwind": "Continue" - } - }, - "span": 33 - } - }, - { - "statements": [], - "terminator": { - "kind": { - "Call": { - "args": [ - { - "Constant": { - "const_": { - "id": 4, - "kind": "ZeroSized" - }, - "span": 32, - "user_ty": null - } - } - ], - "destination": { - "local": 2, - "projection": [] - }, - "func": { - "Constant": { - "const_": { - "id": 5, - "kind": "ZeroSized" - }, - "span": 34, - "user_ty": null - } - }, - "target": 2, - "unwind": "Unreachable" - } - }, - "span": 35 - } - }, - { - "statements": [], - "terminator": { - "kind": "Return", - "span": 36 - } - } - ], - "locals": [ - { - "mutability": "Mut", - "span": 37 - }, - { - "mutability": "Not", - "span": 38 - }, - { - "mutability": "Not", - "span": 39 - } - ], - "span": 42, - "spread_arg": null, - "var_debug_info": [ - { - "argument_index": 1, + "argument_index": 3, "composite": null, - "name": "f", + "name": "argv", "source_info": { - "scope": 0, - "span": 38 + "scope": 0 }, "value": { "Place": { - "local": 1, + "local": 3, "projection": [] } } }, { - "argument_index": null, + "argument_index": 4, "composite": null, - "name": "result", + "name": "sigpipe", "source_info": { - "scope": 1, - "span": 40 + "scope": 0 }, "value": { "Place": { - "local": 0, + "local": 4, "projection": [] } } - }, - { - "argument_index": 1, - "composite": null, - "name": "dummy", - "source_info": { - "scope": 2, - "span": 41 - }, - "value": { - "Const": { - "const_": { - "id": 4, - "kind": "ZeroSized" - }, - "span": 32, - "user_ty": null - } - } } ] }, - "id": 2, - "name": "std::sys::backtrace::__rust_begin_short_backtrace::" - } - }, - "symbol_name": "_ZN3std3sys9backtrace28__rust_begin_short_backtrace17h" - }, - { - "details": null, - "mono_item_kind": { - "MonoItemFn": { - "body": { - "arg_count": 1, - "blocks": [ - { - "statements": [ - { - "kind": { - "Assign": [ - { - "local": 0, - "projection": [] - }, - { - "Use": { - "Constant": { - "const_": { - "id": 8, - "kind": { - "Allocated": { - "align": 1, - "bytes": [ - 0 - ], - "mutability": "Mut", - "provenance": { - "ptrs": [] - } - } - } - }, - "span": 46, - "user_ty": null - } - } - } - ] - }, - "span": 46 - } - ], - "terminator": { - "kind": "Return", - "span": 45 - } - } - ], - "locals": [ - { - "mutability": "Mut", - "span": 47 - }, - { - "mutability": "Not", - "span": 48 - } - ], - "span": 49, - "spread_arg": null, - "var_debug_info": [ - { - "argument_index": 1, - "composite": null, - "name": "self", - "source_info": { - "scope": 0, - "span": 48 - }, - "value": { - "Const": { - "const_": { - "id": 4, - "kind": "ZeroSized" - }, - "span": 32, - "user_ty": null - } - } - } - ] - }, - "id": 5, - "name": "<() as std::process::Termination>::report" + "name": "std::rt::lang_start::<()>" } }, - "symbol_name": "_ZN54_$LT$$LP$$RP$$u20$as$u20$std..process..Termination$GT$6report17h" + "symbol_name": "_ZN3std2rt10lang_start17h" }, { "details": null, @@ -953,20 +367,17 @@ { "kind": { "StorageLive": 2 - }, - "span": 16 + } }, { "kind": { "StorageLive": 3 - }, - "span": 15 + } }, { "kind": { "StorageLive": 4 - }, - "span": 17 + } }, { "kind": { @@ -984,7 +395,7 @@ { "Field": [ 0, - 7 + 0 ] } ] @@ -992,8 +403,7 @@ } } ] - }, - "span": 17 + } } ], "terminator": { @@ -1014,18 +424,15 @@ "func": { "Constant": { "const_": { - "id": 1, "kind": "ZeroSized" }, - "span": 14, "user_ty": null } }, "target": 1, "unwind": "Continue" } - }, - "span": 15 + } } }, { @@ -1033,8 +440,7 @@ { "kind": { "StorageDead": 4 - }, - "span": 19 + } } ], "terminator": { @@ -1055,18 +461,15 @@ "func": { "Constant": { "const_": { - "id": 2, "kind": "ZeroSized" }, - "span": 18, "user_ty": null } }, "target": 2, "unwind": "Continue" } - }, - "span": 16 + } } }, { @@ -1074,14 +477,12 @@ { "kind": { "StorageDead": 3 - }, - "span": 21 + } }, { "kind": { "StorageLive": 5 - }, - "span": 22 + } }, { "kind": { @@ -1091,71 +492,34 @@ "projection": [] }, { - "Ref": [ - { - "kind": "ReErased" - }, - "Shared", - { + "Use": { + "Copy": { "local": 2, "projection": [ { "Field": [ 0, - 15 + 0 + ] + }, + { + "Field": [ + 0, + 0 ] } ] } - ] + } } ] - }, - "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, + "local": 0, "projection": [] }, { @@ -1163,73 +527,52 @@ "IntToInt", { "Move": { - "local": 6, + "local": 5, "projection": [] } }, - 16 + 0 ] } ] - }, - "span": 24 - }, - { - "kind": { - "StorageDead": 6 - }, - "span": 25 + } }, { "kind": { "StorageDead": 5 - }, - "span": 26 + } }, { "kind": { "StorageDead": 2 - }, - "span": 27 + } } ], "terminator": { - "kind": "Return", - "span": 20 + "kind": "Return" } } ], "locals": [ { - "mutability": "Mut", - "span": 28 - }, - { - "mutability": "Mut", - "span": 3 + "mutability": "Mut" }, { - "mutability": "Mut", - "span": 16 + "mutability": "Mut" }, { - "mutability": "Mut", - "span": 15 + "mutability": "Mut" }, { - "mutability": "Mut", - "span": 17 + "mutability": "Mut" }, { - "mutability": "Mut", - "span": 22 + "mutability": "Mut" }, { - "mutability": "Mut", - "span": 23 + "mutability": "Mut" } ], - "span": 3, "spread_arg": null, "var_debug_info": [ { @@ -1237,8 +580,7 @@ "composite": null, "name": "main", "source_info": { - "scope": 0, - "span": 9 + "scope": 0 }, "value": { "Place": { @@ -1248,7 +590,7 @@ { "Field": [ 0, - 7 + 0 ] } ] @@ -1260,8 +602,7 @@ "composite": null, "name": "self", "source_info": { - "scope": 1, - "span": 29 + "scope": 1 }, "value": { "Place": { @@ -1269,25 +610,9 @@ "projection": [] } } - }, - { - "argument_index": 1, - "composite": null, - "name": "self", - "source_info": { - "scope": 2, - "span": 30 - }, - "value": { - "Place": { - "local": 5, - "projection": [] - } - } } ] }, - "id": 1, "name": "std::rt::lang_start::<()>::{closure#0}" } }, @@ -1298,62 +623,150 @@ "mono_item_kind": { "MonoItemFn": { "body": { - "arg_count": 2, + "arg_count": 1, "blocks": [ { "statements": [], "terminator": { "kind": { "Call": { - "args": [], + "args": [ + { + "Move": { + "local": 1, + "projection": [] + } + }, + { + "Constant": { + "const_": { + "kind": "ZeroSized" + }, + "user_ty": null + } + } + ], "destination": { "local": 0, "projection": [] }, "func": { - "Move": { - "local": 1, - "projection": [] + "Constant": { + "const_": { + "kind": "ZeroSized" + }, + "user_ty": null } }, "target": 1, "unwind": "Continue" } - }, - "span": 43 + } + } + }, + { + "statements": [], + "terminator": { + "kind": { + "Call": { + "args": [ + { + "Constant": { + "const_": { + "kind": "ZeroSized" + }, + "user_ty": null + } + } + ], + "destination": { + "local": 2, + "projection": [] + }, + "func": { + "Constant": { + "const_": { + "kind": "ZeroSized" + }, + "user_ty": null + } + }, + "target": 2, + "unwind": "Unreachable" + } + } } }, { "statements": [], "terminator": { - "kind": "Return", - "span": 43 + "kind": "Return" } } ], "locals": [ { - "mutability": "Mut", - "span": 43 + "mutability": "Mut" }, { - "mutability": "Not", - "span": 43 + "mutability": "Not" }, { - "mutability": "Not", - "span": 43 + "mutability": "Not" } ], - "span": 43, - "spread_arg": 2, - "var_debug_info": [] + "spread_arg": null, + "var_debug_info": [ + { + "argument_index": 1, + "composite": null, + "name": "f", + "source_info": { + "scope": 0 + }, + "value": { + "Place": { + "local": 1, + "projection": [] + } + } + }, + { + "argument_index": null, + "composite": null, + "name": "result", + "source_info": { + "scope": 1 + }, + "value": { + "Place": { + "local": 0, + "projection": [] + } + } + }, + { + "argument_index": 1, + "composite": null, + "name": "dummy", + "source_info": { + "scope": 2 + }, + "value": { + "Const": { + "const_": { + "kind": "ZeroSized" + }, + "user_ty": null + } + } + } + ] }, - "id": 3, - "name": ">::call_once" + "name": "std::sys::backtrace::__rust_begin_short_backtrace::" } }, - "symbol_name": "_ZN4core3ops8function6FnOnce9call_once17h" + "symbol_name": "_ZN3std3sys9backtrace28__rust_begin_short_backtrace17h" }, { "details": null, @@ -1390,52 +803,98 @@ "func": { "Constant": { "const_": { - "id": 6, "kind": "ZeroSized" }, - "span": 43, "user_ty": null } }, "target": 1, "unwind": "Continue" } - }, - "span": 43 + } } }, { "statements": [], "terminator": { - "kind": "Return", - "span": 43 + "kind": "Return" } } ], "locals": [ { - "mutability": "Mut", - "span": 43 + "mutability": "Mut" }, { - "mutability": "Not", - "span": 43 + "mutability": "Not" }, { - "mutability": "Not", - "span": 43 + "mutability": "Not" } ], - "span": 43, "spread_arg": 2, "var_debug_info": [] }, - "id": 3, "name": "<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once" } }, "symbol_name": "_ZN4core3ops8function6FnOnce40call_once$u7b$$u7b$vtable.shim$u7d$$u7d$17h" }, + { + "details": null, + "mono_item_kind": { + "MonoItemFn": { + "body": { + "arg_count": 2, + "blocks": [ + { + "statements": [], + "terminator": { + "kind": { + "Call": { + "args": [], + "destination": { + "local": 0, + "projection": [] + }, + "func": { + "Move": { + "local": 1, + "projection": [] + } + }, + "target": 1, + "unwind": "Continue" + } + } + } + }, + { + "statements": [], + "terminator": { + "kind": "Return" + } + } + ], + "locals": [ + { + "mutability": "Mut" + }, + { + "mutability": "Not" + }, + { + "mutability": "Not" + } + ], + "spread_arg": 2, + "var_debug_info": [] + }, + "name": ">::call_once" + } + }, + "symbol_name": "_ZN4core3ops8function6FnOnce9call_once17h" + }, { "details": null, "mono_item_kind": { @@ -1469,8 +928,7 @@ ] } ] - }, - "span": 43 + } } ], "terminator": { @@ -1497,10 +955,8 @@ "func": { "Constant": { "const_": { - "id": 7, "kind": "ZeroSized" }, - "span": 43, "user_ty": null } }, @@ -1509,8 +965,7 @@ "Cleanup": 3 } } - }, - "span": 43 + } } }, { @@ -1525,15 +980,13 @@ "target": 2, "unwind": "Continue" } - }, - "span": 43 + } } }, { "statements": [], "terminator": { - "kind": "Return", - "span": 43 + "kind": "Return" } }, { @@ -1548,41 +1001,33 @@ "target": 4, "unwind": "Terminate" } - }, - "span": 43 + } } }, { "statements": [], "terminator": { - "kind": "Resume", - "span": 43 + "kind": "Resume" } } ], "locals": [ { - "mutability": "Mut", - "span": 43 + "mutability": "Mut" }, { - "mutability": "Not", - "span": 43 + "mutability": "Not" }, { - "mutability": "Not", - "span": 43 + "mutability": "Not" }, { - "mutability": "Not", - "span": 43 + "mutability": "Not" } ], - "span": 43, "spread_arg": 2, "var_debug_info": [] }, - "id": 3, "name": "<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once" } }, @@ -1593,348 +1038,600 @@ "mono_item_kind": { "MonoItemFn": { "body": { - "arg_count": 4, + "arg_count": 1, + "blocks": [ + { + "statements": [], + "terminator": { + "kind": "Return" + } + } + ], + "locals": [ + { + "mutability": "Mut" + }, + { + "mutability": "Not" + } + ], + "spread_arg": null, + "var_debug_info": [] + }, + "name": "std::ptr::drop_in_place::<{closure@std::rt::lang_start<()>::{closure#0}}>" + } + }, + "symbol_name": "_ZN4core3ptr85drop_in_place$LT$std..rt..lang_start$LT$$LP$$RP$$GT$..$u7b$$u7b$closure$u7d$$u7d$$GT$17h" + }, + { + "details": null, + "mono_item_kind": { + "MonoItemFn": { + "body": { + "arg_count": 1, "blocks": [ { "statements": [ { "kind": { - "StorageLive": 5 - }, - "span": 1 - }, - { - "kind": { - "StorageLive": 6 - }, - "span": 2 - }, + "Assign": [ + { + "local": 0, + "projection": [] + }, + { + "Use": { + "Constant": { + "const_": { + "kind": { + "Allocated": { + "align": 1, + "bytes": [ + 0 + ], + "mutability": "Mut", + "provenance": { + "ptrs": [] + } + } + } + }, + "user_ty": null + } + } + } + ] + } + } + ], + "terminator": { + "kind": "Return" + } + } + ], + "locals": [ + { + "mutability": "Mut" + }, + { + "mutability": "Not" + } + ], + "spread_arg": null, + "var_debug_info": [] + }, + "name": "<() as std::process::Termination>::report" + } + }, + "symbol_name": "_ZN54_$LT$$LP$$RP$$u20$as$u20$std..process..Termination$GT$6report17h" + }, + { + "details": null, + "mono_item_kind": { + "MonoItemFn": { + "body": { + "arg_count": 0, + "blocks": [ + { + "statements": [ { "kind": { - "StorageLive": 8 - }, - "span": 3 - }, + "Assign": [ + { + "local": 2, + "projection": [] + }, + { + "BinaryOp": [ + "Eq", + { + "Constant": { + "const_": { + "kind": { + "Allocated": { + "align": 4, + "bytes": [ + 10, + 0, + 0, + 0 + ], + "mutability": "Mut", + "provenance": { + "ptrs": [] + } + } + } + }, + "user_ty": null + } + }, + { + "Constant": { + "const_": { + "kind": { + "Allocated": { + "align": 4, + "bytes": [ + 0, + 0, + 0, + 0 + ], + "mutability": "Mut", + "provenance": { + "ptrs": [] + } + } + } + }, + "user_ty": null + } + } + ] + } + ] + } + } + ], + "terminator": { + "kind": { + "Assert": { + "cond": { + "Move": { + "local": 2, + "projection": [] + } + }, + "expected": false, + "msg": { + "RemainderByZero": { + "Constant": { + "const_": { + "kind": { + "Allocated": { + "align": 4, + "bytes": [ + 42, + 0, + 0, + 0 + ], + "mutability": "Mut", + "provenance": { + "ptrs": [] + } + } + } + }, + "user_ty": null + } + } + }, + "target": 1, + "unwind": "Continue" + } + } + } + }, + { + "statements": [ { "kind": { "Assign": [ { - "local": 8, + "local": 3, "projection": [] }, { - "Aggregate": [ + "BinaryOp": [ + "Eq", { - "Closure": [ - 1, - [ - { - "Type": 1 - }, - { - "Type": 2 - }, - { - "Type": 3 - }, - { - "Type": 4 + "Constant": { + "const_": { + "kind": { + "Allocated": { + "align": 4, + "bytes": [ + 10, + 0, + 0, + 0 + ], + "mutability": "Mut", + "provenance": { + "ptrs": [] + } + } } - ] - ] + }, + "user_ty": null + } }, - [ - { - "Copy": { - "local": 1, - "projection": [] - } + { + "Constant": { + "const_": { + "kind": { + "Allocated": { + "align": 4, + "bytes": [ + 255, + 255, + 255, + 255 + ], + "mutability": "Mut", + "provenance": { + "ptrs": [] + } + } + } + }, + "user_ty": null } - ] + } ] } ] - }, - "span": 3 + } }, { "kind": { "Assign": [ { - "local": 7, + "local": 4, "projection": [] }, { - "Ref": [ + "BinaryOp": [ + "Eq", { - "kind": "ReErased" + "Constant": { + "const_": { + "kind": { + "Allocated": { + "align": 4, + "bytes": [ + 42, + 0, + 0, + 0 + ], + "mutability": "Mut", + "provenance": { + "ptrs": [] + } + } + } + }, + "user_ty": null + } }, - "Shared", { - "local": 8, - "projection": [] + "Constant": { + "const_": { + "kind": { + "Allocated": { + "align": 4, + "bytes": [ + 0, + 0, + 0, + 128 + ], + "mutability": "Mut", + "provenance": { + "ptrs": [] + } + } + } + }, + "user_ty": null + } } ] } ] - }, - "span": 2 + } }, { "kind": { "Assign": [ { - "local": 6, + "local": 5, "projection": [] }, { - "Cast": [ + "BinaryOp": [ + "BitAnd", { - "PointerCoercion": "Unsize" + "Move": { + "local": 3, + "projection": [] + } }, { - "Copy": { - "local": 7, + "Move": { + "local": 4, "projection": [] } + } + ] + } + ] + } + } + ], + "terminator": { + "kind": { + "Assert": { + "cond": { + "Move": { + "local": 5, + "projection": [] + } + }, + "expected": false, + "msg": { + "Overflow": [ + "Rem", + { + "Constant": { + "const_": { + "kind": { + "Allocated": { + "align": 4, + "bytes": [ + 42, + 0, + 0, + 0 + ], + "mutability": "Mut", + "provenance": { + "ptrs": [] + } + } + } + }, + "user_ty": null + } + }, + { + "Constant": { + "const_": { + "kind": { + "Allocated": { + "align": 4, + "bytes": [ + 10, + 0, + 0, + 0 + ], + "mutability": "Mut", + "provenance": { + "ptrs": [] + } + } + } + }, + "user_ty": null + } + } + ] + }, + "target": 2, + "unwind": "Continue" + } + } + } + }, + { + "statements": [ + { + "kind": { + "Assign": [ + { + "local": 1, + "projection": [] + }, + { + "BinaryOp": [ + "Rem", + { + "Constant": { + "const_": { + "kind": { + "Allocated": { + "align": 4, + "bytes": [ + 42, + 0, + 0, + 0 + ], + "mutability": "Mut", + "provenance": { + "ptrs": [] + } + } + } + }, + "user_ty": null + } }, - 5 + { + "Constant": { + "const_": { + "kind": { + "Allocated": { + "align": 4, + "bytes": [ + 10, + 0, + 0, + 0 + ], + "mutability": "Mut", + "provenance": { + "ptrs": [] + } + } + } + }, + "user_ty": null + } + } ] } ] - }, - "span": 2 + } } ], + "terminator": { + "kind": { + "SwitchInt": { + "discr": { + "Move": { + "local": 1, + "projection": [] + } + }, + "targets": { + "branches": [ + [ + 2, + 3 + ] + ], + "otherwise": 4 + } + } + } + } + }, + { + "statements": [], + "terminator": { + "kind": "Return" + } + }, + { + "statements": [], "terminator": { "kind": { "Call": { "args": [ { - "Move": { - "local": 6, - "projection": [] - } - }, - { - "Move": { - "local": 2, - "projection": [] - } - }, - { - "Move": { - "local": 3, - "projection": [] - } - }, - { - "Move": { - "local": 4, - "projection": [] + "Constant": { + "const_": { + "kind": { + "Allocated": { + "align": 8, + "bytes": [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 30, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "mutability": "Mut", + "provenance": { + "ptrs": [ + [ + 0, + 0 + ] + ] + } + } + } + }, + "user_ty": null } } ], "destination": { - "local": 5, + "local": 6, "projection": [] }, "func": { "Constant": { "const_": { - "id": 0, "kind": "ZeroSized" }, - "span": 0, "user_ty": null } }, - "target": 1, + "target": null, "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": [ { - "mutability": "Mut", - "span": 8 - }, - { - "mutability": "Not", - "span": 9 - }, - { - "mutability": "Not", - "span": 10 + "mutability": "Mut" }, { - "mutability": "Not", - "span": 11 + "mutability": "Mut" }, { - "mutability": "Not", - "span": 12 + "mutability": "Mut" }, { - "mutability": "Mut", - "span": 1 + "mutability": "Mut" }, { - "mutability": "Mut", - "span": 2 + "mutability": "Mut" }, { - "mutability": "Not", - "span": 2 + "mutability": "Mut" }, { - "mutability": "Not", - "span": 3 + "mutability": "Mut" } ], - "span": 13, "spread_arg": null, - "var_debug_info": [ - { - "argument_index": 1, - "composite": null, - "name": "main", - "source_info": { - "scope": 0, - "span": 9 - }, - "value": { - "Place": { - "local": 1, - "projection": [] - } - } - }, - { - "argument_index": 2, - "composite": null, - "name": "argc", - "source_info": { - "scope": 0, - "span": 10 - }, - "value": { - "Place": { - "local": 2, - "projection": [] - } - } - }, - { - "argument_index": 3, - "composite": null, - "name": "argv", - "source_info": { - "scope": 0, - "span": 11 - }, - "value": { - "Place": { - "local": 3, - "projection": [] - } - } - }, - { - "argument_index": 4, - "composite": null, - "name": "sigpipe", - "source_info": { - "scope": 0, - "span": 12 - }, - "value": { - "Place": { - "local": 4, - "projection": [] - } - } - }, - { - "argument_index": null, - "composite": null, - "name": "v", - "source_info": { - "scope": 1, - "span": 6 - }, - "value": { - "Place": { - "local": 0, - "projection": [] - } - } - } - ] + "var_debug_info": [] }, - "id": 0, - "name": "std::rt::lang_start::<()>" + "name": "main" } }, - "symbol_name": "_ZN3std2rt10lang_start17h" + "symbol_name": "_ZN6modulo4main17h" } ], "types": [ @@ -1976,54 +1673,6 @@ } } ], - [ - { - "EnumType": { - "discriminants": [ - 0, - 1 - ], - "fields": "elided", - "layout": { - "abi": { - "Scalar": { - "Initialized": { - "valid_range": { - "end": 18446744073709551615, - "start": 0 - }, - "value": { - "Int": { - "length": "I64", - "signed": true - } - } - } - } - }, - "abi_align": 8, - "fields": { - "Arbitrary": { - "offsets": [ - { - "num_bits": 0 - } - ] - } - }, - "size": { - "num_bits": 64 - }, - "variants": { - "Single": { - "index": 0 - } - } - }, - "name": "std::result::Result" - } - } - ], [ { "StructType": { @@ -2377,39 +2026,6 @@ } } ], - [ - { - "RefType": { - "layout": { - "abi": { - "Scalar": { - "Initialized": { - "valid_range": { - "end": 18446744073709551615, - "start": 1 - }, - "value": { - "Pointer": 0 - } - } - } - }, - "abi_align": 8, - "fields": "Primitive", - "size": { - "num_bits": 64 - }, - "variants": { - "Single": { - "index": 0 - } - } - }, - "mutability": "Not", - "pointee_type": "elided" - } - } - ], [ { "RefType": { diff --git a/tests/integration/programs/mutual_recursion.smir.json.expected b/tests/integration/expected/nightly-2025-03-01/mutual_recursion.smir.json.expected similarity index 80% rename from tests/integration/programs/mutual_recursion.smir.json.expected rename to tests/integration/expected/nightly-2025-03-01/mutual_recursion.smir.json.expected index b28ac02e..d7c716f2 100644 --- a/tests/integration/programs/mutual_recursion.smir.json.expected +++ b/tests/integration/expected/nightly-2025-03-01/mutual_recursion.smir.json.expected @@ -117,7 +117,6 @@ { "Constant": { "const_": { - "id": 14, "kind": { "Allocated": { "align": 4, @@ -134,7 +133,6 @@ } } }, - "span": 73, "user_ty": null } } @@ -146,18 +144,15 @@ "func": { "Constant": { "const_": { - "id": 13, "kind": "ZeroSized" }, - "span": 72, "user_ty": null } }, "target": 1, "unwind": "Continue" } - }, - "span": 74 + } } }, { @@ -181,15 +176,13 @@ "otherwise": 2 } } - }, - "span": 75 + } } }, { "statements": [], "terminator": { - "kind": "Return", - "span": 76 + "kind": "Return" } }, { @@ -201,7 +194,6 @@ { "Constant": { "const_": { - "id": 16, "kind": { "Allocated": { "align": 8, @@ -235,7 +227,6 @@ } } }, - "span": 32, "user_ty": null } } @@ -247,36 +238,29 @@ "func": { "Constant": { "const_": { - "id": 15, "kind": "ZeroSized" }, - "span": 77, "user_ty": null } }, "target": null, "unwind": "Continue" } - }, - "span": 77 + } } } ], "locals": [ { - "mutability": "Mut", - "span": 78 + "mutability": "Mut" }, { - "mutability": "Not", - "span": 79 + "mutability": "Not" }, { - "mutability": "Mut", - "span": 77 + "mutability": "Mut" } ], - "span": 80, "spread_arg": null, "var_debug_info": [ { @@ -284,8 +268,7 @@ "composite": null, "name": "ans", "source_info": { - "scope": 1, - "span": 79 + "scope": 1 }, "value": { "Place": { @@ -296,218 +279,11 @@ } ] }, - "id": 8, "name": "main" } }, "symbol_name": "_ZN16mutual_recursion4main17h" }, - { - "details": null, - "mono_item_kind": { - "MonoItemFn": { - "body": { - "arg_count": 1, - "blocks": [ - { - "statements": [], - "terminator": { - "kind": "Return", - "span": 44 - } - } - ], - "locals": [ - { - "mutability": "Mut", - "span": 44 - }, - { - "mutability": "Not", - "span": 44 - } - ], - "span": 44, - "spread_arg": null, - "var_debug_info": [] - }, - "id": 4, - "name": "std::ptr::drop_in_place::<{closure@std::rt::lang_start<()>::{closure#0}}>" - } - }, - "symbol_name": "_ZN4core3ptr85drop_in_place$LT$std..rt..lang_start$LT$$LP$$RP$$GT$..$u7b$$u7b$closure$u7d$$u7d$$GT$17h" - }, - { - "details": null, - "mono_item_kind": { - "MonoItemFn": { - "body": { - "arg_count": 1, - "blocks": [ - { - "statements": [], - "terminator": { - "kind": { - "Call": { - "args": [ - { - "Move": { - "local": 1, - "projection": [] - } - }, - { - "Constant": { - "const_": { - "id": 4, - "kind": "ZeroSized" - }, - "span": 32, - "user_ty": null - } - } - ], - "destination": { - "local": 0, - "projection": [] - }, - "func": { - "Constant": { - "const_": { - "id": 3, - "kind": "ZeroSized" - }, - "span": 31, - "user_ty": null - } - }, - "target": 1, - "unwind": "Continue" - } - }, - "span": 33 - } - }, - { - "statements": [], - "terminator": { - "kind": { - "Call": { - "args": [ - { - "Constant": { - "const_": { - "id": 4, - "kind": "ZeroSized" - }, - "span": 32, - "user_ty": null - } - } - ], - "destination": { - "local": 2, - "projection": [] - }, - "func": { - "Constant": { - "const_": { - "id": 5, - "kind": "ZeroSized" - }, - "span": 34, - "user_ty": null - } - }, - "target": 2, - "unwind": "Unreachable" - } - }, - "span": 35 - } - }, - { - "statements": [], - "terminator": { - "kind": "Return", - "span": 36 - } - } - ], - "locals": [ - { - "mutability": "Mut", - "span": 37 - }, - { - "mutability": "Not", - "span": 38 - }, - { - "mutability": "Not", - "span": 39 - } - ], - "span": 42, - "spread_arg": null, - "var_debug_info": [ - { - "argument_index": 1, - "composite": null, - "name": "f", - "source_info": { - "scope": 0, - "span": 38 - }, - "value": { - "Place": { - "local": 1, - "projection": [] - } - } - }, - { - "argument_index": null, - "composite": null, - "name": "result", - "source_info": { - "scope": 1, - "span": 40 - }, - "value": { - "Place": { - "local": 0, - "projection": [] - } - } - }, - { - "argument_index": 1, - "composite": null, - "name": "dummy", - "source_info": { - "scope": 2, - "span": 41 - }, - "value": { - "Const": { - "const_": { - "id": 4, - "kind": "ZeroSized" - }, - "span": 32, - "user_ty": null - } - } - } - ] - }, - "id": 2, - "name": "std::sys::backtrace::__rust_begin_short_backtrace::" - } - }, - "symbol_name": "_ZN3std3sys9backtrace28__rust_begin_short_backtrace17h" - }, { "details": null, "mono_item_kind": { @@ -536,8 +312,7 @@ "otherwise": 2 } } - }, - "span": 50 + } } }, { @@ -553,12 +328,11 @@ "Use": { "Constant": { "const_": { - "id": 9, "kind": { "Allocated": { "align": 1, "bytes": [ - 1 + 0 ], "mutability": "Mut", "provenance": { @@ -567,14 +341,12 @@ } } }, - "span": 52, "user_ty": null } } } ] - }, - "span": 52 + } } ], "terminator": { @@ -582,8 +354,7 @@ "Goto": { "target": 4 } - }, - "span": 51 + } } }, { @@ -607,7 +378,6 @@ { "Constant": { "const_": { - "id": 10, "kind": { "Allocated": { "align": 4, @@ -624,15 +394,13 @@ } } }, - "span": 53, "user_ty": null } } ] } ] - }, - "span": 54 + } } ], "terminator": { @@ -645,7 +413,7 @@ { "Field": [ 1, - 25 + 0 ] } ] @@ -664,7 +432,6 @@ { "Constant": { "const_": { - "id": 10, "kind": { "Allocated": { "align": 4, @@ -681,7 +448,6 @@ } } }, - "span": 53, "user_ty": null } } @@ -690,8 +456,7 @@ "target": 3, "unwind": "Continue" } - }, - "span": 54 + } } }, { @@ -711,7 +476,7 @@ { "Field": [ 0, - 26 + 0 ] } ] @@ -719,8 +484,7 @@ } } ] - }, - "span": 54 + } } ], "terminator": { @@ -741,47 +505,38 @@ "func": { "Constant": { "const_": { - "id": 11, "kind": "ZeroSized" }, - "span": 55, "user_ty": null } }, "target": 4, "unwind": "Continue" } - }, - "span": 56 + } } }, { "statements": [], "terminator": { - "kind": "Return", - "span": 57 + "kind": "Return" } } ], "locals": [ { - "mutability": "Mut", - "span": 58 + "mutability": "Mut" }, { - "mutability": "Not", - "span": 59 + "mutability": "Not" }, { - "mutability": "Mut", - "span": 54 + "mutability": "Mut" }, { - "mutability": "Mut", - "span": 54 + "mutability": "Mut" } ], - "span": 60, "spread_arg": null, "var_debug_info": [ { @@ -789,8 +544,7 @@ "composite": null, "name": "n", "source_info": { - "scope": 0, - "span": 59 + "scope": 0 }, "value": { "Place": { @@ -801,11 +555,10 @@ } ] }, - "id": 6, - "name": "is_even" + "name": "is_odd" } }, - "symbol_name": "_ZN16mutual_recursion7is_even17h" + "symbol_name": "_ZN16mutual_recursion6is_odd17h" }, { "details": null, @@ -835,8 +588,7 @@ "otherwise": 2 } } - }, - "span": 61 + } } }, { @@ -852,12 +604,11 @@ "Use": { "Constant": { "const_": { - "id": 12, "kind": { "Allocated": { "align": 1, "bytes": [ - 0 + 1 ], "mutability": "Mut", "provenance": { @@ -866,14 +617,12 @@ } } }, - "span": 63, "user_ty": null } } } ] - }, - "span": 63 + } } ], "terminator": { @@ -881,8 +630,7 @@ "Goto": { "target": 4 } - }, - "span": 62 + } } }, { @@ -906,7 +654,6 @@ { "Constant": { "const_": { - "id": 10, "kind": { "Allocated": { "align": 4, @@ -923,15 +670,13 @@ } } }, - "span": 64, "user_ty": null } } ] } ] - }, - "span": 65 + } } ], "terminator": { @@ -944,7 +689,7 @@ { "Field": [ 1, - 25 + 0 ] } ] @@ -963,7 +708,6 @@ { "Constant": { "const_": { - "id": 10, "kind": { "Allocated": { "align": 4, @@ -980,7 +724,6 @@ } } }, - "span": 64, "user_ty": null } } @@ -989,8 +732,7 @@ "target": 3, "unwind": "Continue" } - }, - "span": 65 + } } }, { @@ -1010,7 +752,7 @@ { "Field": [ 0, - 26 + 0 ] } ] @@ -1018,8 +760,7 @@ } } ] - }, - "span": 65 + } } ], "terminator": { @@ -1040,47 +781,38 @@ "func": { "Constant": { "const_": { - "id": 13, "kind": "ZeroSized" }, - "span": 66, "user_ty": null } }, "target": 4, "unwind": "Continue" } - }, - "span": 67 + } } }, { "statements": [], "terminator": { - "kind": "Return", - "span": 68 + "kind": "Return" } } ], "locals": [ { - "mutability": "Mut", - "span": 69 + "mutability": "Mut" }, { - "mutability": "Not", - "span": 70 + "mutability": "Not" }, { - "mutability": "Mut", - "span": 65 + "mutability": "Mut" }, { - "mutability": "Mut", - "span": 65 + "mutability": "Mut" } ], - "span": 71, "spread_arg": null, "var_debug_info": [ { @@ -1088,8 +820,7 @@ "composite": null, "name": "n", "source_info": { - "scope": 0, - "span": 70 + "scope": 0 }, "value": { "Place": { @@ -1100,101 +831,273 @@ } ] }, - "id": 7, - "name": "is_odd" + "name": "is_even" } }, - "symbol_name": "_ZN16mutual_recursion6is_odd17h" + "symbol_name": "_ZN16mutual_recursion7is_even17h" }, { "details": null, "mono_item_kind": { "MonoItemFn": { "body": { - "arg_count": 1, + "arg_count": 4, "blocks": [ { "statements": [ + { + "kind": { + "StorageLive": 5 + } + }, + { + "kind": { + "StorageLive": 7 + } + }, { "kind": { "Assign": [ { - "local": 0, + "local": 7, "projection": [] }, { - "Use": { - "Constant": { - "const_": { - "id": 8, - "kind": { - "Allocated": { - "align": 1, - "bytes": [ - 0 - ], - "mutability": "Mut", - "provenance": { - "ptrs": [] - } + "Aggregate": [ + { + "Closure": [ + 0, + [ + { + "Type": 0 + }, + { + "Type": 0 + }, + { + "Type": 0 + }, + { + "Type": 0 } - } - }, - "span": 46, - "user_ty": null + ] + ] + }, + [ + { + "Copy": { + "local": 1, + "projection": [] + } + } + ] + ] + } + ] + } + }, + { + "kind": { + "Assign": [ + { + "local": 6, + "projection": [] + }, + { + "Ref": [ + { + "kind": "ReErased" + }, + "Shared", + { + "local": 7, + "projection": [] } - } + ] } ] - }, - "span": 46 + } + }, + { + "kind": { + "Assign": [ + { + "local": 5, + "projection": [] + }, + { + "Cast": [ + { + "PointerCoercion": "Unsize" + }, + { + "Copy": { + "local": 6, + "projection": [] + } + }, + 0 + ] + } + ] + } + } + ], + "terminator": { + "kind": { + "Call": { + "args": [ + { + "Move": { + "local": 5, + "projection": [] + } + }, + { + "Move": { + "local": 2, + "projection": [] + } + }, + { + "Move": { + "local": 3, + "projection": [] + } + }, + { + "Move": { + "local": 4, + "projection": [] + } + } + ], + "destination": { + "local": 0, + "projection": [] + }, + "func": { + "Constant": { + "const_": { + "kind": "ZeroSized" + }, + "user_ty": null + } + }, + "target": 1, + "unwind": "Continue" + } + } + } + }, + { + "statements": [ + { + "kind": { + "StorageDead": 5 + } + }, + { + "kind": { + "StorageDead": 7 + } } ], "terminator": { - "kind": "Return", - "span": 45 + "kind": "Return" } } ], "locals": [ { - "mutability": "Mut", - "span": 47 + "mutability": "Mut" + }, + { + "mutability": "Not" + }, + { + "mutability": "Not" + }, + { + "mutability": "Not" + }, + { + "mutability": "Not" + }, + { + "mutability": "Mut" }, { - "mutability": "Not", - "span": 48 + "mutability": "Not" + }, + { + "mutability": "Not" } ], - "span": 49, "spread_arg": null, "var_debug_info": [ { "argument_index": 1, "composite": null, - "name": "self", + "name": "main", "source_info": { - "scope": 0, - "span": 48 + "scope": 0 }, "value": { - "Const": { - "const_": { - "id": 4, - "kind": "ZeroSized" - }, - "span": 32, - "user_ty": null + "Place": { + "local": 1, + "projection": [] + } + } + }, + { + "argument_index": 2, + "composite": null, + "name": "argc", + "source_info": { + "scope": 0 + }, + "value": { + "Place": { + "local": 2, + "projection": [] + } + } + }, + { + "argument_index": 3, + "composite": null, + "name": "argv", + "source_info": { + "scope": 0 + }, + "value": { + "Place": { + "local": 3, + "projection": [] + } + } + }, + { + "argument_index": 4, + "composite": null, + "name": "sigpipe", + "source_info": { + "scope": 0 + }, + "value": { + "Place": { + "local": 4, + "projection": [] } } } ] }, - "id": 5, - "name": "<() as std::process::Termination>::report" + "name": "std::rt::lang_start::<()>" } }, - "symbol_name": "_ZN54_$LT$$LP$$RP$$u20$as$u20$std..process..Termination$GT$6report17h" + "symbol_name": "_ZN3std2rt10lang_start17h" }, { "details": null, @@ -1208,20 +1111,17 @@ { "kind": { "StorageLive": 2 - }, - "span": 16 + } }, { "kind": { "StorageLive": 3 - }, - "span": 15 + } }, { "kind": { "StorageLive": 4 - }, - "span": 17 + } }, { "kind": { @@ -1239,7 +1139,7 @@ { "Field": [ 0, - 7 + 0 ] } ] @@ -1247,8 +1147,7 @@ } } ] - }, - "span": 17 + } } ], "terminator": { @@ -1269,18 +1168,15 @@ "func": { "Constant": { "const_": { - "id": 1, "kind": "ZeroSized" }, - "span": 14, "user_ty": null } }, "target": 1, "unwind": "Continue" } - }, - "span": 15 + } } }, { @@ -1288,8 +1184,7 @@ { "kind": { "StorageDead": 4 - }, - "span": 19 + } } ], "terminator": { @@ -1310,18 +1205,15 @@ "func": { "Constant": { "const_": { - "id": 2, "kind": "ZeroSized" }, - "span": 18, "user_ty": null } }, "target": 2, "unwind": "Continue" } - }, - "span": 16 + } } }, { @@ -1329,14 +1221,12 @@ { "kind": { "StorageDead": 3 - }, - "span": 21 + } }, { "kind": { "StorageLive": 5 - }, - "span": 22 + } }, { "kind": { @@ -1345,42 +1235,6 @@ "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": { @@ -1389,13 +1243,13 @@ { "Field": [ 0, - 15 + 0 ] }, { "Field": [ 0, - 9 + 0 ] } ] @@ -1403,8 +1257,7 @@ } } ] - }, - "span": 23 + } }, { "kind": { @@ -1418,73 +1271,52 @@ "IntToInt", { "Move": { - "local": 6, + "local": 5, "projection": [] } }, - 16 + 0 ] } ] - }, - "span": 24 - }, - { - "kind": { - "StorageDead": 6 - }, - "span": 25 + } }, { "kind": { "StorageDead": 5 - }, - "span": 26 + } }, { "kind": { "StorageDead": 2 - }, - "span": 27 + } } ], "terminator": { - "kind": "Return", - "span": 20 + "kind": "Return" } } ], "locals": [ { - "mutability": "Mut", - "span": 28 - }, - { - "mutability": "Mut", - "span": 3 + "mutability": "Mut" }, { - "mutability": "Mut", - "span": 16 + "mutability": "Mut" }, { - "mutability": "Mut", - "span": 15 + "mutability": "Mut" }, { - "mutability": "Mut", - "span": 17 + "mutability": "Mut" }, { - "mutability": "Mut", - "span": 22 + "mutability": "Mut" }, { - "mutability": "Mut", - "span": 23 + "mutability": "Mut" } ], - "span": 3, "spread_arg": null, "var_debug_info": [ { @@ -1492,8 +1324,7 @@ "composite": null, "name": "main", "source_info": { - "scope": 0, - "span": 9 + "scope": 0 }, "value": { "Place": { @@ -1503,7 +1334,7 @@ { "Field": [ 0, - 7 + 0 ] } ] @@ -1515,8 +1346,7 @@ "composite": null, "name": "self", "source_info": { - "scope": 1, - "span": 29 + "scope": 1 }, "value": { "Place": { @@ -1524,25 +1354,9 @@ "projection": [] } } - }, - { - "argument_index": 1, - "composite": null, - "name": "self", - "source_info": { - "scope": 2, - "span": 30 - }, - "value": { - "Place": { - "local": 5, - "projection": [] - } - } } ] }, - "id": 1, "name": "std::rt::lang_start::<()>::{closure#0}" } }, @@ -1553,62 +1367,150 @@ "mono_item_kind": { "MonoItemFn": { "body": { - "arg_count": 2, + "arg_count": 1, "blocks": [ { "statements": [], "terminator": { "kind": { "Call": { - "args": [], + "args": [ + { + "Move": { + "local": 1, + "projection": [] + } + }, + { + "Constant": { + "const_": { + "kind": "ZeroSized" + }, + "user_ty": null + } + } + ], "destination": { "local": 0, "projection": [] }, "func": { - "Move": { - "local": 1, - "projection": [] + "Constant": { + "const_": { + "kind": "ZeroSized" + }, + "user_ty": null } }, "target": 1, "unwind": "Continue" } - }, - "span": 43 + } + } + }, + { + "statements": [], + "terminator": { + "kind": { + "Call": { + "args": [ + { + "Constant": { + "const_": { + "kind": "ZeroSized" + }, + "user_ty": null + } + } + ], + "destination": { + "local": 2, + "projection": [] + }, + "func": { + "Constant": { + "const_": { + "kind": "ZeroSized" + }, + "user_ty": null + } + }, + "target": 2, + "unwind": "Unreachable" + } + } } }, { "statements": [], "terminator": { - "kind": "Return", - "span": 43 + "kind": "Return" } } ], "locals": [ { - "mutability": "Mut", - "span": 43 + "mutability": "Mut" }, { - "mutability": "Not", - "span": 43 + "mutability": "Not" }, { - "mutability": "Not", - "span": 43 + "mutability": "Not" } ], - "span": 43, - "spread_arg": 2, - "var_debug_info": [] + "spread_arg": null, + "var_debug_info": [ + { + "argument_index": 1, + "composite": null, + "name": "f", + "source_info": { + "scope": 0 + }, + "value": { + "Place": { + "local": 1, + "projection": [] + } + } + }, + { + "argument_index": null, + "composite": null, + "name": "result", + "source_info": { + "scope": 1 + }, + "value": { + "Place": { + "local": 0, + "projection": [] + } + } + }, + { + "argument_index": 1, + "composite": null, + "name": "dummy", + "source_info": { + "scope": 2 + }, + "value": { + "Const": { + "const_": { + "kind": "ZeroSized" + }, + "user_ty": null + } + } + } + ] }, - "id": 3, - "name": ">::call_once" + "name": "std::sys::backtrace::__rust_begin_short_backtrace::" } }, - "symbol_name": "_ZN4core3ops8function6FnOnce9call_once17h" + "symbol_name": "_ZN3std3sys9backtrace28__rust_begin_short_backtrace17h" }, { "details": null, @@ -1645,52 +1547,98 @@ "func": { "Constant": { "const_": { - "id": 6, "kind": "ZeroSized" }, - "span": 43, "user_ty": null } }, "target": 1, "unwind": "Continue" } - }, - "span": 43 + } } }, { "statements": [], "terminator": { - "kind": "Return", - "span": 43 + "kind": "Return" } } ], "locals": [ { - "mutability": "Mut", - "span": 43 + "mutability": "Mut" }, { - "mutability": "Not", - "span": 43 + "mutability": "Not" }, { - "mutability": "Not", - "span": 43 + "mutability": "Not" } ], - "span": 43, "spread_arg": 2, "var_debug_info": [] }, - "id": 3, "name": "<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once" } }, "symbol_name": "_ZN4core3ops8function6FnOnce40call_once$u7b$$u7b$vtable.shim$u7d$$u7d$17h" }, + { + "details": null, + "mono_item_kind": { + "MonoItemFn": { + "body": { + "arg_count": 2, + "blocks": [ + { + "statements": [], + "terminator": { + "kind": { + "Call": { + "args": [], + "destination": { + "local": 0, + "projection": [] + }, + "func": { + "Move": { + "local": 1, + "projection": [] + } + }, + "target": 1, + "unwind": "Continue" + } + } + } + }, + { + "statements": [], + "terminator": { + "kind": "Return" + } + } + ], + "locals": [ + { + "mutability": "Mut" + }, + { + "mutability": "Not" + }, + { + "mutability": "Not" + } + ], + "spread_arg": 2, + "var_debug_info": [] + }, + "name": ">::call_once" + } + }, + "symbol_name": "_ZN4core3ops8function6FnOnce9call_once17h" + }, { "details": null, "mono_item_kind": { @@ -1724,8 +1672,7 @@ ] } ] - }, - "span": 43 + } } ], "terminator": { @@ -1752,10 +1699,8 @@ "func": { "Constant": { "const_": { - "id": 7, "kind": "ZeroSized" }, - "span": 43, "user_ty": null } }, @@ -1764,8 +1709,7 @@ "Cleanup": 3 } } - }, - "span": 43 + } } }, { @@ -1780,15 +1724,13 @@ "target": 2, "unwind": "Continue" } - }, - "span": 43 + } } }, { "statements": [], "terminator": { - "kind": "Return", - "span": 43 + "kind": "Return" } }, { @@ -1803,222 +1745,77 @@ "target": 4, "unwind": "Terminate" } - }, - "span": 43 - } - }, - { - "statements": [], - "terminator": { - "kind": "Resume", - "span": 43 - } - } - ], - "locals": [ - { - "mutability": "Mut", - "span": 43 - }, - { - "mutability": "Not", - "span": 43 - }, - { - "mutability": "Not", - "span": 43 - }, - { - "mutability": "Not", - "span": 43 - } - ], - "span": 43, - "spread_arg": 2, - "var_debug_info": [] - }, - "id": 3, - "name": "<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once" - } - }, - "symbol_name": "_ZN4core3ops8function6FnOnce9call_once17h" - }, - { - "details": null, - "mono_item_kind": { - "MonoItemFn": { - "body": { - "arg_count": 4, - "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": { - "args": [ - { - "Move": { - "local": 6, - "projection": [] - } - }, - { - "Move": { - "local": 2, - "projection": [] - } - }, - { - "Move": { - "local": 3, - "projection": [] - } - }, - { - "Move": { - "local": 4, - "projection": [] - } - } - ], - "destination": { - "local": 5, - "projection": [] - }, - "func": { - "Constant": { - "const_": { - "id": 0, - "kind": "ZeroSized" - }, - "span": 0, - "user_ty": null - } - }, - "target": 1, - "unwind": "Continue" - } - }, - "span": 1 } }, + { + "statements": [], + "terminator": { + "kind": "Resume" + } + } + ], + "locals": [ + { + "mutability": "Mut" + }, + { + "mutability": "Not" + }, + { + "mutability": "Not" + }, + { + "mutability": "Not" + } + ], + "spread_arg": 2, + "var_debug_info": [] + }, + "name": "<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once" + } + }, + "symbol_name": "_ZN4core3ops8function6FnOnce9call_once17h" + }, + { + "details": null, + "mono_item_kind": { + "MonoItemFn": { + "body": { + "arg_count": 1, + "blocks": [ + { + "statements": [], + "terminator": { + "kind": "Return" + } + } + ], + "locals": [ + { + "mutability": "Mut" + }, + { + "mutability": "Not" + } + ], + "spread_arg": null, + "var_debug_info": [] + }, + "name": "std::ptr::drop_in_place::<{closure@std::rt::lang_start<()>::{closure#0}}>" + } + }, + "symbol_name": "_ZN4core3ptr85drop_in_place$LT$std..rt..lang_start$LT$$LP$$RP$$GT$..$u7b$$u7b$closure$u7d$$u7d$$GT$17h" + }, + { + "details": null, + "mono_item_kind": { + "MonoItemFn": { + "body": { + "arg_count": 1, + "blocks": [ { "statements": [ - { - "kind": { - "StorageDead": 6 - }, - "span": 5 - }, { "kind": { "Assign": [ @@ -2028,168 +1825,49 @@ }, { "Use": { - "Copy": { - "local": 5, - "projection": [ - { - "Downcast": 0 - }, - { - "Field": [ - 0, - 6 - ] + "Constant": { + "const_": { + "kind": { + "Allocated": { + "align": 1, + "bytes": [ + 0 + ], + "mutability": "Mut", + "provenance": { + "ptrs": [] + } + } } - ] + }, + "user_ty": null } } } ] - }, - "span": 6 - }, - { - "kind": { - "StorageDead": 8 - }, - "span": 7 - }, - { - "kind": { - "StorageDead": 5 - }, - "span": 7 + } } ], "terminator": { - "kind": "Return", - "span": 4 + "kind": "Return" } } ], "locals": [ { - "mutability": "Mut", - "span": 8 - }, - { - "mutability": "Not", - "span": 9 - }, - { - "mutability": "Not", - "span": 10 - }, - { - "mutability": "Not", - "span": 11 - }, - { - "mutability": "Not", - "span": 12 - }, - { - "mutability": "Mut", - "span": 1 - }, - { - "mutability": "Mut", - "span": 2 - }, - { - "mutability": "Not", - "span": 2 + "mutability": "Mut" }, { - "mutability": "Not", - "span": 3 + "mutability": "Not" } ], - "span": 13, "spread_arg": null, - "var_debug_info": [ - { - "argument_index": 1, - "composite": null, - "name": "main", - "source_info": { - "scope": 0, - "span": 9 - }, - "value": { - "Place": { - "local": 1, - "projection": [] - } - } - }, - { - "argument_index": 2, - "composite": null, - "name": "argc", - "source_info": { - "scope": 0, - "span": 10 - }, - "value": { - "Place": { - "local": 2, - "projection": [] - } - } - }, - { - "argument_index": 3, - "composite": null, - "name": "argv", - "source_info": { - "scope": 0, - "span": 11 - }, - "value": { - "Place": { - "local": 3, - "projection": [] - } - } - }, - { - "argument_index": 4, - "composite": null, - "name": "sigpipe", - "source_info": { - "scope": 0, - "span": 12 - }, - "value": { - "Place": { - "local": 4, - "projection": [] - } - } - }, - { - "argument_index": null, - "composite": null, - "name": "v", - "source_info": { - "scope": 1, - "span": 6 - }, - "value": { - "Place": { - "local": 0, - "projection": [] - } - } - } - ] + "var_debug_info": [] }, - "id": 0, - "name": "std::rt::lang_start::<()>" + "name": "<() as std::process::Termination>::report" } }, - "symbol_name": "_ZN3std2rt10lang_start17h" + "symbol_name": "_ZN54_$LT$$LP$$RP$$u20$as$u20$std..process..Termination$GT$6report17h" } ], "types": [ @@ -2231,54 +1909,6 @@ } } ], - [ - { - "EnumType": { - "discriminants": [ - 0, - 1 - ], - "fields": "elided", - "layout": { - "abi": { - "Scalar": { - "Initialized": { - "valid_range": { - "end": 18446744073709551615, - "start": 0 - }, - "value": { - "Int": { - "length": "I64", - "signed": true - } - } - } - } - }, - "abi_align": 8, - "fields": { - "Arbitrary": { - "offsets": [ - { - "num_bits": 0 - } - ] - } - }, - "size": { - "num_bits": 64 - }, - "variants": { - "Single": { - "index": 0 - } - } - }, - "name": "std::result::Result" - } - } - ], [ { "StructType": { @@ -2694,39 +2324,6 @@ } } ], - [ - { - "RefType": { - "layout": { - "abi": { - "Scalar": { - "Initialized": { - "valid_range": { - "end": 18446744073709551615, - "start": 1 - }, - "value": { - "Pointer": 0 - } - } - } - }, - "abi_align": 8, - "fields": "Primitive", - "size": { - "num_bits": 64 - }, - "variants": { - "Single": { - "index": 0 - } - } - }, - "mutability": "Not", - "pointee_type": "elided" - } - } - ], [ { "RefType": { diff --git a/tests/integration/programs/option-construction.smir.json.expected b/tests/integration/expected/nightly-2025-03-01/option-construction.smir.json.expected similarity index 78% rename from tests/integration/programs/option-construction.smir.json.expected rename to tests/integration/expected/nightly-2025-03-01/option-construction.smir.json.expected index a351ccbd..d7884044 100644 --- a/tests/integration/programs/option-construction.smir.json.expected +++ b/tests/integration/expected/nightly-2025-03-01/option-construction.smir.json.expected @@ -73,11 +73,11 @@ "Aggregate": [ { "Adt": [ - 8, + 0, 1, [ { - "Type": 26 + "Type": 0 } ], null, @@ -88,7 +88,6 @@ { "Constant": { "const_": { - "id": 11, "kind": { "Allocated": { "align": 4, @@ -105,7 +104,6 @@ } } }, - "span": 62, "user_ty": null } } @@ -113,8 +111,7 @@ ] } ] - }, - "span": 63 + } }, { "kind": { @@ -127,11 +124,11 @@ "Aggregate": [ { "Adt": [ - 8, + 0, 0, [ { - "Type": 26 + "Type": 0 } ], null, @@ -142,8 +139,7 @@ ] } ] - }, - "span": 64 + } } ], "terminator": { @@ -164,47 +160,38 @@ "func": { "Constant": { "const_": { - "id": 10, "kind": "ZeroSized" }, - "span": 60, "user_ty": null } }, "target": 1, "unwind": "Continue" } - }, - "span": 61 + } } }, { "statements": [], "terminator": { - "kind": "Return", - "span": 65 + "kind": "Return" } } ], "locals": [ { - "mutability": "Mut", - "span": 66 + "mutability": "Mut" }, { - "mutability": "Not", - "span": 67 + "mutability": "Not" }, { - "mutability": "Not", - "span": 68 + "mutability": "Not" }, { - "mutability": "Not", - "span": 69 + "mutability": "Not" } ], - "span": 70, "spread_arg": null, "var_debug_info": [ { @@ -212,8 +199,7 @@ "composite": null, "name": "a", "source_info": { - "scope": 1, - "span": 67 + "scope": 1 }, "value": { "Place": { @@ -227,8 +213,7 @@ "composite": null, "name": "b", "source_info": { - "scope": 2, - "span": 68 + "scope": 2 }, "value": { "Place": { @@ -242,8 +227,7 @@ "composite": null, "name": "c", "source_info": { - "scope": 3, - "span": 69 + "scope": 3 }, "value": { "Place": { @@ -254,7 +238,6 @@ } ] }, - "id": 7, "name": "main" } }, @@ -265,63 +248,134 @@ "mono_item_kind": { "MonoItemFn": { "body": { - "arg_count": 1, - "blocks": [ - { - "statements": [], - "terminator": { - "kind": "Return", - "span": 44 - } - } - ], - "locals": [ - { - "mutability": "Mut", - "span": 44 - }, - { - "mutability": "Not", - "span": 44 - } - ], - "span": 44, - "spread_arg": null, - "var_debug_info": [] - }, - "id": 4, - "name": "std::ptr::drop_in_place::<{closure@std::rt::lang_start<()>::{closure#0}}>" - } - }, - "symbol_name": "_ZN4core3ptr85drop_in_place$LT$std..rt..lang_start$LT$$LP$$RP$$GT$..$u7b$$u7b$closure$u7d$$u7d$$GT$17h" - }, - { - "details": null, - "mono_item_kind": { - "MonoItemFn": { - "body": { - "arg_count": 1, + "arg_count": 4, "blocks": [ { - "statements": [], + "statements": [ + { + "kind": { + "StorageLive": 5 + } + }, + { + "kind": { + "StorageLive": 7 + } + }, + { + "kind": { + "Assign": [ + { + "local": 7, + "projection": [] + }, + { + "Aggregate": [ + { + "Closure": [ + 0, + [ + { + "Type": 0 + }, + { + "Type": 0 + }, + { + "Type": 0 + }, + { + "Type": 0 + } + ] + ] + }, + [ + { + "Copy": { + "local": 1, + "projection": [] + } + } + ] + ] + } + ] + } + }, + { + "kind": { + "Assign": [ + { + "local": 6, + "projection": [] + }, + { + "Ref": [ + { + "kind": "ReErased" + }, + "Shared", + { + "local": 7, + "projection": [] + } + ] + } + ] + } + }, + { + "kind": { + "Assign": [ + { + "local": 5, + "projection": [] + }, + { + "Cast": [ + { + "PointerCoercion": "Unsize" + }, + { + "Copy": { + "local": 6, + "projection": [] + } + }, + 0 + ] + } + ] + } + } + ], "terminator": { "kind": { "Call": { "args": [ { "Move": { - "local": 1, + "local": 5, "projection": [] } }, { - "Constant": { - "const_": { - "id": 4, - "kind": "ZeroSized" - }, - "span": 32, - "user_ty": null + "Move": { + "local": 2, + "projection": [] + } + }, + { + "Move": { + "local": 3, + "projection": [] + } + }, + { + "Move": { + "local": 4, + "projection": [] } } ], @@ -332,90 +386,69 @@ "func": { "Constant": { "const_": { - "id": 3, "kind": "ZeroSized" }, - "span": 31, "user_ty": null } }, "target": 1, "unwind": "Continue" } - }, - "span": 33 + } } }, { - "statements": [], - "terminator": { - "kind": { - "Call": { - "args": [ - { - "Constant": { - "const_": { - "id": 4, - "kind": "ZeroSized" - }, - "span": 32, - "user_ty": null - } - } - ], - "destination": { - "local": 2, - "projection": [] - }, - "func": { - "Constant": { - "const_": { - "id": 5, - "kind": "ZeroSized" - }, - "span": 34, - "user_ty": null - } - }, - "target": 2, - "unwind": "Unreachable" + "statements": [ + { + "kind": { + "StorageDead": 5 } }, - "span": 35 - } - }, - { - "statements": [], + { + "kind": { + "StorageDead": 7 + } + } + ], "terminator": { - "kind": "Return", - "span": 36 + "kind": "Return" } } ], "locals": [ { - "mutability": "Mut", - "span": 37 + "mutability": "Mut" + }, + { + "mutability": "Not" + }, + { + "mutability": "Not" + }, + { + "mutability": "Not" }, { - "mutability": "Not", - "span": 38 + "mutability": "Not" }, { - "mutability": "Not", - "span": 39 + "mutability": "Mut" + }, + { + "mutability": "Not" + }, + { + "mutability": "Not" } ], - "span": 42, "spread_arg": null, "var_debug_info": [ { "argument_index": 1, "composite": null, - "name": "f", + "name": "main", "source_info": { - "scope": 0, - "span": 38 + "scope": 0 }, "value": { "Place": { @@ -425,46 +458,53 @@ } }, { - "argument_index": null, + "argument_index": 2, "composite": null, - "name": "result", + "name": "argc", "source_info": { - "scope": 1, - "span": 40 + "scope": 0 }, "value": { "Place": { - "local": 0, + "local": 2, "projection": [] } } }, { - "argument_index": 1, + "argument_index": 3, "composite": null, - "name": "dummy", + "name": "argv", "source_info": { - "scope": 2, - "span": 41 + "scope": 0 }, "value": { - "Const": { - "const_": { - "id": 4, - "kind": "ZeroSized" - }, - "span": 32, - "user_ty": null + "Place": { + "local": 3, + "projection": [] + } + } + }, + { + "argument_index": 4, + "composite": null, + "name": "sigpipe", + "source_info": { + "scope": 0 + }, + "value": { + "Place": { + "local": 4, + "projection": [] } } } ] }, - "id": 2, - "name": "std::sys::backtrace::__rust_begin_short_backtrace::" + "name": "std::rt::lang_start::<()>" } }, - "symbol_name": "_ZN3std3sys9backtrace28__rust_begin_short_backtrace17h" + "symbol_name": "_ZN3std2rt10lang_start17h" }, { "details": null, @@ -475,196 +515,148 @@ "blocks": [ { "statements": [ + { + "kind": { + "StorageLive": 2 + } + }, + { + "kind": { + "StorageLive": 3 + } + }, + { + "kind": { + "StorageLive": 4 + } + }, { "kind": { "Assign": [ { - "local": 0, + "local": 4, "projection": [] }, { "Use": { - "Constant": { - "const_": { - "id": 9, - "kind": { - "Allocated": { - "align": 1, - "bytes": [ - 0 - ], - "mutability": "Mut", - "provenance": { - "ptrs": [] - } - } + "Copy": { + "local": 1, + "projection": [ + "Deref", + { + "Field": [ + 0, + 0 + ] } - }, - "span": 56, - "user_ty": null + ] } } } ] - }, - "span": 56 + } } ], "terminator": { - "kind": "Return", - "span": 55 - } - } - ], - "locals": [ - { - "mutability": "Mut", - "span": 57 - }, - { - "mutability": "Not", - "span": 58 - } - ], - "span": 59, - "spread_arg": null, - "var_debug_info": [ - { - "argument_index": 1, - "composite": null, - "name": "self", - "source_info": { - "scope": 0, - "span": 58 - }, - "value": { - "Const": { - "const_": { - "id": 4, - "kind": "ZeroSized" - }, - "span": 32, - "user_ty": null - } - } - } - ] - }, - "id": 6, - "name": "<() as std::process::Termination>::report" - } - }, - "symbol_name": "_ZN54_$LT$$LP$$RP$$u20$as$u20$std..process..Termination$GT$6report17h" - }, - { - "details": null, - "mono_item_kind": { - "MonoItemFn": { - "body": { - "arg_count": 1, - "blocks": [ - { - "statements": [ - { - "kind": { - "Assign": [ - { - "local": 2, - "projection": [] - }, + "kind": { + "Call": { + "args": [ { - "Discriminant": { - "local": 1, + "Move": { + "local": 4, "projection": [] } } - ] - }, - "span": 46 - } - ], - "terminator": { - "kind": { - "SwitchInt": { - "discr": { - "Move": { - "local": 2, - "projection": [] + ], + "destination": { + "local": 3, + "projection": [] + }, + "func": { + "Constant": { + "const_": { + "kind": "ZeroSized" + }, + "user_ty": null } }, - "targets": { - "branches": [ - [ - 0, - 2 - ], - [ - 1, - 3 - ] - ], - "otherwise": 1 - } + "target": 1, + "unwind": "Continue" } - }, - "span": 45 - } - }, - { - "statements": [], - "terminator": { - "kind": "Unreachable", - "span": 46 + } } }, { - "statements": [], + "statements": [ + { + "kind": { + "StorageDead": 4 + } + } + ], "terminator": { "kind": { "Call": { - "args": [], + "args": [ + { + "Move": { + "local": 3, + "projection": [] + } + } + ], "destination": { - "local": 3, + "local": 2, "projection": [] }, "func": { "Constant": { "const_": { - "id": 8, "kind": "ZeroSized" }, - "span": 47, "user_ty": null } }, - "target": null, + "target": 2, "unwind": "Continue" } - }, - "span": 48 + } } }, { "statements": [ + { + "kind": { + "StorageDead": 3 + } + }, + { + "kind": { + "StorageLive": 5 + } + }, { "kind": { "Assign": [ { - "local": 0, + "local": 5, "projection": [] }, { "Use": { - "Move": { - "local": 1, + "Copy": { + "local": 2, "projection": [ { - "Downcast": 1 + "Field": [ + 0, + 0 + ] }, { "Field": [ 0, - 26 + 0 ] } ] @@ -672,74 +664,110 @@ } } ] - }, - "span": 50 + } + }, + { + "kind": { + "Assign": [ + { + "local": 0, + "projection": [] + }, + { + "Cast": [ + "IntToInt", + { + "Move": { + "local": 5, + "projection": [] + } + }, + 0 + ] + } + ] + } + }, + { + "kind": { + "StorageDead": 5 + } + }, + { + "kind": { + "StorageDead": 2 + } } ], "terminator": { - "kind": "Return", - "span": 49 + "kind": "Return" } } ], "locals": [ { - "mutability": "Mut", - "span": 51 + "mutability": "Mut" + }, + { + "mutability": "Mut" }, { - "mutability": "Not", - "span": 52 + "mutability": "Mut" }, { - "mutability": "Mut", - "span": 53 + "mutability": "Mut" }, { - "mutability": "Mut", - "span": 48 + "mutability": "Mut" + }, + { + "mutability": "Mut" } ], - "span": 54, "spread_arg": null, "var_debug_info": [ { - "argument_index": 1, + "argument_index": null, "composite": null, - "name": "self", + "name": "main", "source_info": { - "scope": 0, - "span": 52 + "scope": 0 }, "value": { "Place": { "local": 1, - "projection": [] + "projection": [ + "Deref", + { + "Field": [ + 0, + 0 + ] + } + ] } } }, { - "argument_index": null, + "argument_index": 1, "composite": null, - "name": "val", + "name": "self", "source_info": { - "scope": 1, - "span": 50 + "scope": 1 }, "value": { "Place": { - "local": 0, + "local": 2, "projection": [] } } } ] }, - "id": 5, - "name": "std::option::Option::::unwrap" + "name": "std::rt::lang_start::<()>::{closure#0}" } }, - "symbol_name": "_ZN4core6option15Option$LT$T$GT$6unwrap17h" + "symbol_name": "_ZN3std2rt10lang_start28_$u7b$$u7b$closure$u7d$$u7d$17h" }, { "details": null, @@ -749,323 +777,121 @@ "arg_count": 1, "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 - } - ], + "statements": [], "terminator": { "kind": { "Call": { "args": [ { "Move": { - "local": 4, + "local": 1, "projection": [] } + }, + { + "Constant": { + "const_": { + "kind": "ZeroSized" + }, + "user_ty": null + } } ], "destination": { - "local": 3, + "local": 0, "projection": [] }, "func": { "Constant": { "const_": { - "id": 1, "kind": "ZeroSized" }, - "span": 14, "user_ty": null } }, "target": 1, "unwind": "Continue" } - }, - "span": 15 + } } }, { - "statements": [ - { - "kind": { - "StorageDead": 4 - }, - "span": 19 - } - ], + "statements": [], "terminator": { "kind": { "Call": { "args": [ { - "Move": { - "local": 3, - "projection": [] + "Constant": { + "const_": { + "kind": "ZeroSized" + }, + "user_ty": null } } ], "destination": { - "local": 2, - "projection": [] - }, - "func": { - "Constant": { - "const_": { - "id": 2, - "kind": "ZeroSized" - }, - "span": 18, - "user_ty": null - } - }, - "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 + "local": 2, + "projection": [] + }, + "func": { + "Constant": { + "const_": { + "kind": "ZeroSized" + }, + "user_ty": null + } + }, + "target": 2, + "unwind": "Unreachable" + } } - ], + } + }, + { + "statements": [], "terminator": { - "kind": "Return", - "span": 20 + "kind": "Return" } } ], "locals": [ { - "mutability": "Mut", - "span": 28 - }, - { - "mutability": "Mut", - "span": 3 - }, - { - "mutability": "Mut", - "span": 16 - }, - { - "mutability": "Mut", - "span": 15 - }, - { - "mutability": "Mut", - "span": 17 + "mutability": "Mut" }, { - "mutability": "Mut", - "span": 22 + "mutability": "Not" }, { - "mutability": "Mut", - "span": 23 + "mutability": "Not" } ], - "span": 3, "spread_arg": null, "var_debug_info": [ { - "argument_index": null, + "argument_index": 1, "composite": null, - "name": "main", + "name": "f", "source_info": { - "scope": 0, - "span": 9 + "scope": 0 }, "value": { "Place": { "local": 1, - "projection": [ - "Deref", - { - "Field": [ - 0, - 7 - ] - } - ] + "projection": [] } } }, { - "argument_index": 1, + "argument_index": null, "composite": null, - "name": "self", + "name": "result", "source_info": { - "scope": 1, - "span": 29 + "scope": 1 }, "value": { "Place": { - "local": 2, + "local": 0, "projection": [] } } @@ -1073,25 +899,25 @@ { "argument_index": 1, "composite": null, - "name": "self", + "name": "dummy", "source_info": { - "scope": 2, - "span": 30 + "scope": 2 }, "value": { - "Place": { - "local": 5, - "projection": [] + "Const": { + "const_": { + "kind": "ZeroSized" + }, + "user_ty": null } } } ] }, - "id": 1, - "name": "std::rt::lang_start::<()>::{closure#0}" + "name": "std::sys::backtrace::__rust_begin_short_backtrace::" } }, - "symbol_name": "_ZN3std2rt10lang_start28_$u7b$$u7b$closure$u7d$$u7d$17h" + "symbol_name": "_ZN3std3sys9backtrace28__rust_begin_short_backtrace17h" }, { "details": null, @@ -1105,55 +931,65 @@ "terminator": { "kind": { "Call": { - "args": [], + "args": [ + { + "Move": { + "local": 1, + "projection": [ + "Deref" + ] + } + }, + { + "Move": { + "local": 2, + "projection": [] + } + } + ], "destination": { "local": 0, "projection": [] }, "func": { - "Move": { - "local": 1, - "projection": [] + "Constant": { + "const_": { + "kind": "ZeroSized" + }, + "user_ty": null } }, "target": 1, "unwind": "Continue" } - }, - "span": 43 + } } }, { "statements": [], "terminator": { - "kind": "Return", - "span": 43 + "kind": "Return" } } ], "locals": [ { - "mutability": "Mut", - "span": 43 + "mutability": "Mut" }, { - "mutability": "Not", - "span": 43 + "mutability": "Not" }, { - "mutability": "Not", - "span": 43 + "mutability": "Not" } ], - "span": 43, "spread_arg": 2, "var_debug_info": [] }, - "id": 3, - "name": ">::call_once" + "name": "<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once" } }, - "symbol_name": "_ZN4core3ops8function6FnOnce9call_once17h" + "symbol_name": "_ZN4core3ops8function6FnOnce40call_once$u7b$$u7b$vtable.shim$u7d$$u7d$17h" }, { "details": null, @@ -1167,74 +1003,48 @@ "terminator": { "kind": { "Call": { - "args": [ - { - "Move": { - "local": 1, - "projection": [ - "Deref" - ] - } - }, - { - "Move": { - "local": 2, - "projection": [] - } - } - ], + "args": [], "destination": { "local": 0, "projection": [] }, "func": { - "Constant": { - "const_": { - "id": 6, - "kind": "ZeroSized" - }, - "span": 43, - "user_ty": null + "Move": { + "local": 1, + "projection": [] } }, "target": 1, "unwind": "Continue" } - }, - "span": 43 + } } }, { "statements": [], "terminator": { - "kind": "Return", - "span": 43 + "kind": "Return" } } ], "locals": [ { - "mutability": "Mut", - "span": 43 + "mutability": "Mut" }, { - "mutability": "Not", - "span": 43 + "mutability": "Not" }, { - "mutability": "Not", - "span": 43 + "mutability": "Not" } ], - "span": 43, "spread_arg": 2, "var_debug_info": [] }, - "id": 3, - "name": "<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once" + "name": ">::call_once" } }, - "symbol_name": "_ZN4core3ops8function6FnOnce40call_once$u7b$$u7b$vtable.shim$u7d$$u7d$17h" + "symbol_name": "_ZN4core3ops8function6FnOnce9call_once17h" }, { "details": null, @@ -1269,8 +1079,7 @@ ] } ] - }, - "span": 43 + } } ], "terminator": { @@ -1297,10 +1106,8 @@ "func": { "Constant": { "const_": { - "id": 7, "kind": "ZeroSized" }, - "span": 43, "user_ty": null } }, @@ -1309,8 +1116,7 @@ "Cleanup": 3 } } - }, - "span": 43 + } } }, { @@ -1325,15 +1131,13 @@ "target": 2, "unwind": "Continue" } - }, - "span": 43 + } } }, { "statements": [], "terminator": { - "kind": "Return", - "span": 43 + "kind": "Return" } }, { @@ -1348,41 +1152,33 @@ "target": 4, "unwind": "Terminate" } - }, - "span": 43 + } } }, { "statements": [], "terminator": { - "kind": "Resume", - "span": 43 + "kind": "Resume" } } ], "locals": [ { - "mutability": "Mut", - "span": 43 + "mutability": "Mut" }, { - "mutability": "Not", - "span": 43 + "mutability": "Not" }, { - "mutability": "Not", - "span": 43 + "mutability": "Not" }, { - "mutability": "Not", - "span": 43 + "mutability": "Not" } ], - "span": 43, "spread_arg": 2, "var_debug_info": [] }, - "id": 3, "name": "<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once" } }, @@ -1393,177 +1189,115 @@ "mono_item_kind": { "MonoItemFn": { "body": { - "arg_count": 4, + "arg_count": 1, + "blocks": [ + { + "statements": [], + "terminator": { + "kind": "Return" + } + } + ], + "locals": [ + { + "mutability": "Mut" + }, + { + "mutability": "Not" + } + ], + "spread_arg": null, + "var_debug_info": [] + }, + "name": "std::ptr::drop_in_place::<{closure@std::rt::lang_start<()>::{closure#0}}>" + } + }, + "symbol_name": "_ZN4core3ptr85drop_in_place$LT$std..rt..lang_start$LT$$LP$$RP$$GT$..$u7b$$u7b$closure$u7d$$u7d$$GT$17h" + }, + { + "details": null, + "mono_item_kind": { + "MonoItemFn": { + "body": { + "arg_count": 1, "blocks": [ { "statements": [ - { - "kind": { - "StorageLive": 5 - }, - "span": 1 - }, - { - "kind": { - "StorageLive": 6 - }, - "span": 2 - }, - { - "kind": { - "StorageLive": 8 - }, - "span": 3 - }, { "kind": { "Assign": [ { - "local": 8, + "local": 2, "projection": [] }, { - "Aggregate": [ - { - "Closure": [ - 1, - [ - { - "Type": 1 - }, - { - "Type": 2 - }, - { - "Type": 3 - }, - { - "Type": 4 - } - ] - ] - }, - [ - { - "Copy": { - "local": 1, - "projection": [] - } - } - ] - ] + "Discriminant": { + "local": 1, + "projection": [] + } } ] - }, - "span": 3 - }, - { - "kind": { - "Assign": [ - { - "local": 7, + } + } + ], + "terminator": { + "kind": { + "SwitchInt": { + "discr": { + "Move": { + "local": 2, "projection": [] - }, - { - "Ref": [ - { - "kind": "ReErased" - }, - "Shared", - { - "local": 8, - "projection": [] - } - ] } - ] - }, - "span": 2 - }, - { - "kind": { - "Assign": [ - { - "local": 6, - "projection": [] - }, - { - "Cast": [ - { - "PointerCoercion": "Unsize" - }, - { - "Copy": { - "local": 7, - "projection": [] - } - }, - 5 + }, + "targets": { + "branches": [ + [ + 0, + 2 + ], + [ + 1, + 3 ] - } - ] - }, - "span": 2 + ], + "otherwise": 1 + } + } } - ], + } + }, + { + "statements": [], + "terminator": { + "kind": "Unreachable" + } + }, + { + "statements": [], "terminator": { "kind": { "Call": { - "args": [ - { - "Move": { - "local": 6, - "projection": [] - } - }, - { - "Move": { - "local": 2, - "projection": [] - } - }, - { - "Move": { - "local": 3, - "projection": [] - } - }, - { - "Move": { - "local": 4, - "projection": [] - } - } - ], + "args": [], "destination": { - "local": 5, + "local": 3, "projection": [] }, "func": { "Constant": { "const_": { - "id": 0, "kind": "ZeroSized" }, - "span": 0, "user_ty": null } }, - "target": 1, + "target": null, "unwind": "Continue" } - }, - "span": 1 + } } }, { "statements": [ - { - "kind": { - "StorageDead": 6 - }, - "span": 5 - }, { "kind": { "Assign": [ @@ -1573,16 +1307,16 @@ }, { "Use": { - "Copy": { - "local": 5, + "Move": { + "local": 1, "projection": [ { - "Downcast": 0 + "Downcast": 1 }, { "Field": [ 0, - 6 + 0 ] } ] @@ -1590,76 +1324,36 @@ } } ] - }, - "span": 6 - }, - { - "kind": { - "StorageDead": 8 - }, - "span": 7 - }, - { - "kind": { - "StorageDead": 5 - }, - "span": 7 + } } ], "terminator": { - "kind": "Return", - "span": 4 + "kind": "Return" } } ], "locals": [ { - "mutability": "Mut", - "span": 8 - }, - { - "mutability": "Not", - "span": 9 - }, - { - "mutability": "Not", - "span": 10 - }, - { - "mutability": "Not", - "span": 11 - }, - { - "mutability": "Not", - "span": 12 - }, - { - "mutability": "Mut", - "span": 1 + "mutability": "Mut" }, { - "mutability": "Mut", - "span": 2 + "mutability": "Not" }, { - "mutability": "Not", - "span": 2 + "mutability": "Mut" }, { - "mutability": "Not", - "span": 3 + "mutability": "Mut" } ], - "span": 13, "spread_arg": null, "var_debug_info": [ { "argument_index": 1, "composite": null, - "name": "main", + "name": "self", "source_info": { - "scope": 0, - "span": 9 + "scope": 0 }, "value": { "Place": { @@ -1669,72 +1363,87 @@ } }, { - "argument_index": 2, + "argument_index": null, "composite": null, - "name": "argc", + "name": "val", "source_info": { - "scope": 0, - "span": 10 + "scope": 1 }, "value": { "Place": { - "local": 2, + "local": 0, "projection": [] } } - }, + } + ] + }, + "name": "std::option::Option::::unwrap" + } + }, + "symbol_name": "_ZN4core6option15Option$LT$T$GT$6unwrap17h" + }, + { + "details": null, + "mono_item_kind": { + "MonoItemFn": { + "body": { + "arg_count": 1, + "blocks": [ { - "argument_index": 3, - "composite": null, - "name": "argv", - "source_info": { - "scope": 0, - "span": 11 - }, - "value": { - "Place": { - "local": 3, - "projection": [] + "statements": [ + { + "kind": { + "Assign": [ + { + "local": 0, + "projection": [] + }, + { + "Use": { + "Constant": { + "const_": { + "kind": { + "Allocated": { + "align": 1, + "bytes": [ + 0 + ], + "mutability": "Mut", + "provenance": { + "ptrs": [] + } + } + } + }, + "user_ty": null + } + } + } + ] + } } + ], + "terminator": { + "kind": "Return" } - }, + } + ], + "locals": [ { - "argument_index": 4, - "composite": null, - "name": "sigpipe", - "source_info": { - "scope": 0, - "span": 12 - }, - "value": { - "Place": { - "local": 4, - "projection": [] - } - } + "mutability": "Mut" }, { - "argument_index": null, - "composite": null, - "name": "v", - "source_info": { - "scope": 1, - "span": 6 - }, - "value": { - "Place": { - "local": 0, - "projection": [] - } - } + "mutability": "Not" } - ] + ], + "spread_arg": null, + "var_debug_info": [] }, - "id": 0, - "name": "std::rt::lang_start::<()>" + "name": "<() as std::process::Termination>::report" } }, - "symbol_name": "_ZN3std2rt10lang_start17h" + "symbol_name": "_ZN54_$LT$$LP$$RP$$u20$as$u20$std..process..Termination$GT$6report17h" } ], "types": [ @@ -1917,54 +1626,6 @@ } } ], - [ - { - "EnumType": { - "discriminants": [ - 0, - 1 - ], - "fields": "elided", - "layout": { - "abi": { - "Scalar": { - "Initialized": { - "valid_range": { - "end": 18446744073709551615, - "start": 0 - }, - "value": { - "Int": { - "length": "I64", - "signed": true - } - } - } - } - }, - "abi_align": 8, - "fields": { - "Arbitrary": { - "offsets": [ - { - "num_bits": 0 - } - ] - } - }, - "size": { - "num_bits": 64 - }, - "variants": { - "Single": { - "index": 0 - } - } - }, - "name": "std::result::Result" - } - } - ], [ { "StructType": { @@ -2318,39 +1979,6 @@ } } ], - [ - { - "RefType": { - "layout": { - "abi": { - "Scalar": { - "Initialized": { - "valid_range": { - "end": 18446744073709551615, - "start": 1 - }, - "value": { - "Pointer": 0 - } - } - } - }, - "abi_align": 8, - "fields": "Primitive", - "size": { - "num_bits": 64 - }, - "variants": { - "Single": { - "index": 0 - } - } - }, - "mutability": "Not", - "pointee_type": "elided" - } - } - ], [ { "RefType": { diff --git a/tests/integration/programs/param_types.smir.json.expected b/tests/integration/expected/nightly-2025-03-01/param_types.smir.json.expected similarity index 86% rename from tests/integration/programs/param_types.smir.json.expected rename to tests/integration/expected/nightly-2025-03-01/param_types.smir.json.expected index b24a6788..c53f4272 100644 --- a/tests/integration/programs/param_types.smir.json.expected +++ b/tests/integration/expected/nightly-2025-03-01/param_types.smir.json.expected @@ -228,11 +228,11 @@ "Aggregate": [ { "Adt": [ - 12, + 0, 0, [ { - "Type": 21 + "Type": 0 } ], null, @@ -243,7 +243,6 @@ { "Constant": { "const_": { - "id": 18, "kind": { "Allocated": { "align": 4, @@ -260,14 +259,12 @@ } } }, - "span": 110, "user_ty": null } }, { "Constant": { "const_": { - "id": 19, "kind": { "Allocated": { "align": 8, @@ -288,7 +285,6 @@ } } }, - "span": 111, "user_ty": null } } @@ -296,8 +292,7 @@ ] } ] - }, - "span": 112 + } }, { "kind": { @@ -310,11 +305,11 @@ "Aggregate": [ { "Adt": [ - 12, + 0, 0, [ { - "Type": 41 + "Type": 0 } ], null, @@ -325,7 +320,6 @@ { "Constant": { "const_": { - "id": 20, "kind": { "Allocated": { "align": 8, @@ -346,14 +340,12 @@ } } }, - "span": 113, "user_ty": null } }, { "Constant": { "const_": { - "id": 19, "kind": { "Allocated": { "align": 8, @@ -374,7 +366,6 @@ } } }, - "span": 114, "user_ty": null } } @@ -382,8 +373,7 @@ ] } ] - }, - "span": 115 + } }, { "kind": { @@ -400,7 +390,7 @@ { "Field": [ 1, - 34 + 0 ] } ] @@ -408,8 +398,7 @@ } } ] - }, - "span": 116 + } }, { "kind": { @@ -422,14 +411,14 @@ "Aggregate": [ { "Adt": [ - 13, + 0, 1, [ { - "Type": 9 + "Type": 0 }, { - "Type": 34 + "Type": 0 } ], null, @@ -447,8 +436,7 @@ ] } ] - }, - "span": 117 + } }, { "kind": { @@ -465,7 +453,7 @@ { "Field": [ 0, - 41 + 0 ] } ] @@ -473,8 +461,7 @@ } } ] - }, - "span": 118 + } }, { "kind": { @@ -487,14 +474,14 @@ "Aggregate": [ { "Adt": [ - 13, + 0, 0, [ { - "Type": 41 + "Type": 0 }, { - "Type": 9 + "Type": 0 } ], null, @@ -512,8 +499,7 @@ ] } ] - }, - "span": 119 + } } ], "terminator": { @@ -534,18 +520,15 @@ "func": { "Constant": { "const_": { - "id": 17, "kind": "ZeroSized" }, - "span": 108, "user_ty": null } }, "target": 1, "unwind": "Continue" } - }, - "span": 109 + } } }, { @@ -568,18 +551,15 @@ "func": { "Constant": { "const_": { - "id": 21, "kind": "ZeroSized" }, - "span": 120, "user_ty": null } }, "target": 2, "unwind": "Continue" } - }, - "span": 121 + } } }, { @@ -600,12 +580,11 @@ "projection": [] } }, - 41 + 0 ] } ] - }, - "span": 124 + } } ], "terminator": { @@ -626,18 +605,15 @@ "func": { "Constant": { "const_": { - "id": 22, "kind": "ZeroSized" }, - "span": 122, "user_ty": null } }, "target": 3, "unwind": "Continue" } - }, - "span": 123 + } } }, { @@ -667,8 +643,7 @@ ] } ] - }, - "span": 125 + } } ], "terminator": { @@ -690,15 +665,13 @@ "otherwise": 4 } } - }, - "span": 125 + } } }, { "statements": [], "terminator": { - "kind": "Return", - "span": 126 + "kind": "Return" } }, { @@ -710,7 +683,6 @@ { "Constant": { "const_": { - "id": 24, "kind": { "Allocated": { "align": 8, @@ -744,7 +716,6 @@ } } }, - "span": 32, "user_ty": null } } @@ -756,76 +727,59 @@ "func": { "Constant": { "const_": { - "id": 23, "kind": "ZeroSized" }, - "span": 127, "user_ty": null } }, "target": null, "unwind": "Continue" } - }, - "span": 127 + } } } ], "locals": [ { - "mutability": "Mut", - "span": 128 + "mutability": "Mut" }, { - "mutability": "Not", - "span": 129 + "mutability": "Not" }, { - "mutability": "Not", - "span": 130 + "mutability": "Not" }, { - "mutability": "Not", - "span": 131 + "mutability": "Not" }, { - "mutability": "Mut", - "span": 116 + "mutability": "Mut" }, { - "mutability": "Not", - "span": 132 + "mutability": "Not" }, { - "mutability": "Mut", - "span": 118 + "mutability": "Mut" }, { - "mutability": "Not", - "span": 133 + "mutability": "Not" }, { - "mutability": "Mut", - "span": 109 + "mutability": "Mut" }, { - "mutability": "Mut", - "span": 125 + "mutability": "Mut" }, { - "mutability": "Mut", - "span": 124 + "mutability": "Mut" }, { - "mutability": "Mut", - "span": 123 + "mutability": "Mut" }, { - "mutability": "Mut", - "span": 127 + "mutability": "Mut" } ], - "span": 134, "spread_arg": null, "var_debug_info": [ { @@ -833,8 +787,7 @@ "composite": null, "name": "a", "source_info": { - "scope": 1, - "span": 129 + "scope": 1 }, "value": { "Place": { @@ -848,8 +801,7 @@ "composite": null, "name": "b", "source_info": { - "scope": 2, - "span": 130 + "scope": 2 }, "value": { "Place": { @@ -863,8 +815,7 @@ "composite": null, "name": "c", "source_info": { - "scope": 3, - "span": 131 + "scope": 3 }, "value": { "Place": { @@ -878,8 +829,7 @@ "composite": null, "name": "d", "source_info": { - "scope": 4, - "span": 132 + "scope": 4 }, "value": { "Place": { @@ -893,8 +843,7 @@ "composite": null, "name": "x", "source_info": { - "scope": 5, - "span": 133 + "scope": 5 }, "value": { "Place": { @@ -905,7 +854,6 @@ } ] }, - "id": 11, "name": "main" } }, @@ -916,98 +864,134 @@ "mono_item_kind": { "MonoItemFn": { "body": { - "arg_count": 1, - "blocks": [ - { - "statements": [], - "terminator": { - "kind": "Return", - "span": 66 - } - } - ], - "locals": [ - { - "mutability": "Mut", - "span": 66 - }, - { - "mutability": "Not", - "span": 66 - } - ], - "span": 66, - "spread_arg": null, - "var_debug_info": [] - }, - "id": 5, - "name": "std::ptr::drop_in_place::" - } - }, - "symbol_name": "_ZN4core3ptr23drop_in_place$LT$u8$GT$17h" - }, - { - "details": null, - "mono_item_kind": { - "MonoItemFn": { - "body": { - "arg_count": 1, - "blocks": [ - { - "statements": [], - "terminator": { - "kind": "Return", - "span": 66 - } - } - ], - "locals": [ - { - "mutability": "Mut", - "span": 66 - }, - { - "mutability": "Not", - "span": 66 - } - ], - "span": 66, - "spread_arg": null, - "var_debug_info": [] - }, - "id": 5, - "name": "std::ptr::drop_in_place::<{closure@std::rt::lang_start<()>::{closure#0}}>" - } - }, - "symbol_name": "_ZN4core3ptr85drop_in_place$LT$std..rt..lang_start$LT$$LP$$RP$$GT$..$u7b$$u7b$closure$u7d$$u7d$$GT$17h" - }, - { - "details": null, - "mono_item_kind": { - "MonoItemFn": { - "body": { - "arg_count": 1, + "arg_count": 4, "blocks": [ { - "statements": [], + "statements": [ + { + "kind": { + "StorageLive": 5 + } + }, + { + "kind": { + "StorageLive": 7 + } + }, + { + "kind": { + "Assign": [ + { + "local": 7, + "projection": [] + }, + { + "Aggregate": [ + { + "Closure": [ + 0, + [ + { + "Type": 0 + }, + { + "Type": 0 + }, + { + "Type": 0 + }, + { + "Type": 0 + } + ] + ] + }, + [ + { + "Copy": { + "local": 1, + "projection": [] + } + } + ] + ] + } + ] + } + }, + { + "kind": { + "Assign": [ + { + "local": 6, + "projection": [] + }, + { + "Ref": [ + { + "kind": "ReErased" + }, + "Shared", + { + "local": 7, + "projection": [] + } + ] + } + ] + } + }, + { + "kind": { + "Assign": [ + { + "local": 5, + "projection": [] + }, + { + "Cast": [ + { + "PointerCoercion": "Unsize" + }, + { + "Copy": { + "local": 6, + "projection": [] + } + }, + 0 + ] + } + ] + } + } + ], "terminator": { "kind": { "Call": { "args": [ { "Move": { - "local": 1, + "local": 5, "projection": [] } }, { - "Constant": { - "const_": { - "id": 4, - "kind": "ZeroSized" - }, - "span": 32, - "user_ty": null + "Move": { + "local": 2, + "projection": [] + } + }, + { + "Move": { + "local": 3, + "projection": [] + } + }, + { + "Move": { + "local": 4, + "projection": [] } } ], @@ -1018,90 +1002,69 @@ "func": { "Constant": { "const_": { - "id": 3, "kind": "ZeroSized" }, - "span": 31, "user_ty": null } }, "target": 1, "unwind": "Continue" } - }, - "span": 33 + } } }, { - "statements": [], - "terminator": { - "kind": { - "Call": { - "args": [ - { - "Constant": { - "const_": { - "id": 4, - "kind": "ZeroSized" - }, - "span": 32, - "user_ty": null - } - } - ], - "destination": { - "local": 2, - "projection": [] - }, - "func": { - "Constant": { - "const_": { - "id": 5, - "kind": "ZeroSized" - }, - "span": 34, - "user_ty": null - } - }, - "target": 2, - "unwind": "Unreachable" + "statements": [ + { + "kind": { + "StorageDead": 5 } }, - "span": 35 - } - }, - { - "statements": [], + { + "kind": { + "StorageDead": 7 + } + } + ], "terminator": { - "kind": "Return", - "span": 36 + "kind": "Return" } } ], "locals": [ { - "mutability": "Mut", - "span": 37 + "mutability": "Mut" + }, + { + "mutability": "Not" + }, + { + "mutability": "Not" + }, + { + "mutability": "Not" + }, + { + "mutability": "Not" + }, + { + "mutability": "Mut" }, { - "mutability": "Not", - "span": 38 + "mutability": "Not" }, { - "mutability": "Not", - "span": 39 + "mutability": "Not" } ], - "span": 42, "spread_arg": null, "var_debug_info": [ { "argument_index": 1, "composite": null, - "name": "f", + "name": "main", "source_info": { - "scope": 0, - "span": 38 + "scope": 0 }, "value": { "Place": { @@ -1111,136 +1074,53 @@ } }, { - "argument_index": null, + "argument_index": 2, "composite": null, - "name": "result", + "name": "argc", "source_info": { - "scope": 1, - "span": 40 + "scope": 0 }, "value": { "Place": { - "local": 0, + "local": 2, "projection": [] } } }, { - "argument_index": 1, + "argument_index": 3, "composite": null, - "name": "dummy", + "name": "argv", "source_info": { - "scope": 2, - "span": 41 + "scope": 0 }, "value": { - "Const": { - "const_": { - "id": 4, - "kind": "ZeroSized" - }, - "span": 32, - "user_ty": null - } - } - } - ] - }, - "id": 2, - "name": "std::sys::backtrace::__rust_begin_short_backtrace::" - } - }, - "symbol_name": "_ZN3std3sys9backtrace28__rust_begin_short_backtrace17h" - }, - { - "details": null, - "mono_item_kind": { - "MonoItemFn": { - "body": { - "arg_count": 1, - "blocks": [ - { - "statements": [ - { - "kind": { - "Assign": [ - { - "local": 0, - "projection": [] - }, - { - "Use": { - "Constant": { - "const_": { - "id": 16, - "kind": { - "Allocated": { - "align": 1, - "bytes": [ - 0 - ], - "mutability": "Mut", - "provenance": { - "ptrs": [] - } - } - } - }, - "span": 104, - "user_ty": null - } - } - } - ] - }, - "span": 104 + "Place": { + "local": 3, + "projection": [] } - ], - "terminator": { - "kind": "Return", - "span": 103 } - } - ], - "locals": [ - { - "mutability": "Mut", - "span": 105 }, { - "mutability": "Not", - "span": 106 - } - ], - "span": 107, - "spread_arg": null, - "var_debug_info": [ - { - "argument_index": 1, + "argument_index": 4, "composite": null, - "name": "self", + "name": "sigpipe", "source_info": { - "scope": 0, - "span": 106 + "scope": 0 }, "value": { - "Const": { - "const_": { - "id": 4, - "kind": "ZeroSized" - }, - "span": 32, - "user_ty": null + "Place": { + "local": 4, + "projection": [] } } } ] }, - "id": 10, - "name": "<() as std::process::Termination>::report" + "name": "std::rt::lang_start::<()>" } }, - "symbol_name": "_ZN54_$LT$$LP$$RP$$u20$as$u20$std..process..Termination$GT$6report17h" + "symbol_name": "_ZN3std2rt10lang_start17h" }, { "details": null, @@ -1251,106 +1131,148 @@ "blocks": [ { "statements": [ + { + "kind": { + "StorageLive": 2 + } + }, + { + "kind": { + "StorageLive": 3 + } + }, + { + "kind": { + "StorageLive": 4 + } + }, { "kind": { "Assign": [ { - "local": 2, + "local": 4, "projection": [] }, { - "Discriminant": { - "local": 1, - "projection": [] + "Use": { + "Copy": { + "local": 1, + "projection": [ + "Deref", + { + "Field": [ + 0, + 0 + ] + } + ] + } } } ] - }, - "span": 68 + } } ], "terminator": { "kind": { - "SwitchInt": { - "discr": { - "Move": { - "local": 2, - "projection": [] + "Call": { + "args": [ + { + "Move": { + "local": 4, + "projection": [] + } } + ], + "destination": { + "local": 3, + "projection": [] }, - "targets": { - "branches": [ - [ - 0, - 2 - ], - [ - 1, - 3 - ] - ], - "otherwise": 1 - } + "func": { + "Constant": { + "const_": { + "kind": "ZeroSized" + }, + "user_ty": null + } + }, + "target": 1, + "unwind": "Continue" } - }, - "span": 67 - } - }, - { - "statements": [], - "terminator": { - "kind": "Unreachable", - "span": 68 + } } }, { - "statements": [], + "statements": [ + { + "kind": { + "StorageDead": 4 + } + } + ], "terminator": { "kind": { "Call": { - "args": [], + "args": [ + { + "Move": { + "local": 3, + "projection": [] + } + } + ], "destination": { - "local": 3, + "local": 2, "projection": [] }, "func": { "Constant": { "const_": { - "id": 13, "kind": "ZeroSized" }, - "span": 69, "user_ty": null } }, - "target": null, + "target": 2, "unwind": "Continue" } - }, - "span": 70 + } } }, { "statements": [ + { + "kind": { + "StorageDead": 3 + } + }, + { + "kind": { + "StorageLive": 5 + } + }, { "kind": { "Assign": [ { - "local": 0, + "local": 5, "projection": [] }, { "Use": { - "Move": { - "local": 1, + "Copy": { + "local": 2, "projection": [ { - "Downcast": 1 + "Field": [ + 0, + 0 + ] }, { "Field": [ 0, - 34 + 0 ] } ] @@ -1358,74 +1280,110 @@ } } ] - }, - "span": 72 + } + }, + { + "kind": { + "Assign": [ + { + "local": 0, + "projection": [] + }, + { + "Cast": [ + "IntToInt", + { + "Move": { + "local": 5, + "projection": [] + } + }, + 0 + ] + } + ] + } + }, + { + "kind": { + "StorageDead": 5 + } + }, + { + "kind": { + "StorageDead": 2 + } } ], "terminator": { - "kind": "Return", - "span": 71 + "kind": "Return" } } ], "locals": [ { - "mutability": "Mut", - "span": 73 + "mutability": "Mut" }, { - "mutability": "Not", - "span": 74 + "mutability": "Mut" }, { - "mutability": "Mut", - "span": 75 + "mutability": "Mut" }, { - "mutability": "Mut", - "span": 70 - } - ], - "span": 76, + "mutability": "Mut" + }, + { + "mutability": "Mut" + }, + { + "mutability": "Mut" + } + ], "spread_arg": null, "var_debug_info": [ { - "argument_index": 1, + "argument_index": null, "composite": null, - "name": "self", + "name": "main", "source_info": { - "scope": 0, - "span": 74 + "scope": 0 }, "value": { "Place": { "local": 1, - "projection": [] + "projection": [ + "Deref", + { + "Field": [ + 0, + 0 + ] + } + ] } } }, { - "argument_index": null, + "argument_index": 1, "composite": null, - "name": "val", + "name": "self", "source_info": { - "scope": 1, - "span": 72 + "scope": 1 }, "value": { "Place": { - "local": 0, + "local": 2, "projection": [] } } } ] }, - "id": 6, - "name": "std::option::Option::::unwrap" + "name": "std::rt::lang_start::<()>::{closure#0}" } }, - "symbol_name": "_ZN4core6option15Option$LT$T$GT$6unwrap17h" + "symbol_name": "_ZN3std2rt10lang_start28_$u7b$$u7b$closure$u7d$$u7d$17h" }, { "details": null, @@ -1435,80 +1393,190 @@ "arg_count": 1, "blocks": [ { - "statements": [ - { - "kind": { - "Assign": [ - { - "local": 2, - "projection": [] - }, + "statements": [], + "terminator": { + "kind": { + "Call": { + "args": [ { - "Discriminant": { + "Move": { "local": 1, "projection": [] } + }, + { + "Constant": { + "const_": { + "kind": "ZeroSized" + }, + "user_ty": null + } } - ] - }, - "span": 78 + ], + "destination": { + "local": 0, + "projection": [] + }, + "func": { + "Constant": { + "const_": { + "kind": "ZeroSized" + }, + "user_ty": null + } + }, + "target": 1, + "unwind": "Continue" + } } - ], + } + }, + { + "statements": [], "terminator": { "kind": { - "SwitchInt": { - "discr": { - "Move": { - "local": 2, - "projection": [] + "Call": { + "args": [ + { + "Constant": { + "const_": { + "kind": "ZeroSized" + }, + "user_ty": null + } } + ], + "destination": { + "local": 2, + "projection": [] }, - "targets": { - "branches": [ - [ - 0, - 3 - ], - [ - 1, - 2 - ] - ], - "otherwise": 1 - } + "func": { + "Constant": { + "const_": { + "kind": "ZeroSized" + }, + "user_ty": null + } + }, + "target": 2, + "unwind": "Unreachable" } - }, - "span": 77 + } } }, { "statements": [], "terminator": { - "kind": "Unreachable", - "span": 78 + "kind": "Return" + } + } + ], + "locals": [ + { + "mutability": "Mut" + }, + { + "mutability": "Not" + }, + { + "mutability": "Not" + } + ], + "spread_arg": null, + "var_debug_info": [ + { + "argument_index": 1, + "composite": null, + "name": "f", + "source_info": { + "scope": 0 + }, + "value": { + "Place": { + "local": 1, + "projection": [] + } + } + }, + { + "argument_index": null, + "composite": null, + "name": "result", + "source_info": { + "scope": 1 + }, + "value": { + "Place": { + "local": 0, + "projection": [] + } } }, + { + "argument_index": 1, + "composite": null, + "name": "dummy", + "source_info": { + "scope": 2 + }, + "value": { + "Const": { + "const_": { + "kind": "ZeroSized" + }, + "user_ty": null + } + } + } + ] + }, + "name": "std::sys::backtrace::__rust_begin_short_backtrace::" + } + }, + "symbol_name": "_ZN3std3sys9backtrace28__rust_begin_short_backtrace17h" + }, + { + "details": null, + "mono_item_kind": { + "MonoItemFn": { + "body": { + "arg_count": 2, + "blocks": [ { "statements": [ + { + "kind": { + "StorageLive": 3 + } + }, + { + "kind": { + "StorageLive": 4 + } + }, { "kind": { "Assign": [ { - "local": 3, + "local": 4, "projection": [] }, { "Use": { - "Move": { - "local": 1, + "Copy": { + "local": 2, "projection": [ + "Deref", { - "Downcast": 1 + "Field": [ + 0, + 0 + ] }, { "Field": [ 0, - 34 + 0 ] } ] @@ -1516,137 +1584,55 @@ } } ] - }, - "span": 80 + } }, { "kind": { "Assign": [ { - "local": 0, + "local": 3, "projection": [] }, { - "Aggregate": [ + "BinaryOp": [ + "BitAnd", { - "Adt": [ - 8, - 1, - [ - { - "Type": 34 - } - ], - null, - null - ] + "Move": { + "local": 4, + "projection": [] + } }, - [ - { - "Copy": { - "local": 3, - "projection": [] - } + { + "Constant": { + "const_": { + "kind": { + "Allocated": { + "align": 4, + "bytes": [ + 16, + 0, + 0, + 0 + ], + "mutability": "Mut", + "provenance": { + "ptrs": [] + } + } + } + }, + "user_ty": null } - ] + } ] } ] - }, - "span": 81 - } - ], - "terminator": { - "kind": { - "Goto": { - "target": 6 } }, - "span": 79 - } - }, - { - "statements": [ { "kind": { - "Assign": [ - { - "local": 0, - "projection": [] - }, - { - "Aggregate": [ - { - "Adt": [ - 8, - 0, - [ - { - "Type": 34 - } - ], - null, - null - ] - }, - [] - ] - } - ] - }, - "span": 82 - } - ], - "terminator": { - "kind": { - "Goto": { - "target": 6 - } - }, - "span": 82 - } - }, - { - "statements": [], - "terminator": { - "kind": "Return", - "span": 83 - } - }, - { - "statements": [], - "terminator": { - "kind": { - "Drop": { - "place": { - "local": 1, - "projection": [] - }, - "target": 4, - "unwind": "Continue" + "StorageDead": 4 } - }, - "span": 84 - } - }, - { - "statements": [ - { - "kind": { - "Assign": [ - { - "local": 4, - "projection": [] - }, - { - "Discriminant": { - "local": 1, - "projection": [] - } - } - ] - }, - "span": 84 } ], "terminator": { @@ -1654,180 +1640,106 @@ "SwitchInt": { "discr": { "Move": { - "local": 4, + "local": 3, "projection": [] } }, "targets": { "branches": [ - [ - 1, - 4 - ], [ 0, - 5 + 2 ] ], "otherwise": 1 } } - }, - "span": 84 - } - } - ], - "locals": [ - { - "mutability": "Mut", - "span": 85 - }, - { - "mutability": "Not", - "span": 86 - }, - { - "mutability": "Mut", - "span": 87 - }, - { - "mutability": "Not", - "span": 80 - }, - { - "mutability": "Mut", - "span": 84 - } - ], - "span": 88, - "spread_arg": null, - "var_debug_info": [ - { - "argument_index": 1, - "composite": null, - "name": "self", - "source_info": { - "scope": 0, - "span": 86 - }, - "value": { - "Place": { - "local": 1, - "projection": [] } } }, - { - "argument_index": null, - "composite": null, - "name": "x", - "source_info": { - "scope": 1, - "span": 80 - }, - "value": { - "Place": { - "local": 3, - "projection": [] - } - } - } - ] - }, - "id": 7, - "name": "std::result::Result::::err" - } - }, - "symbol_name": "_ZN4core6result19Result$LT$T$C$E$GT$3err17h" - }, - { - "details": null, - "mono_item_kind": { - "MonoItemFn": { - "body": { - "arg_count": 1, - "blocks": [ { "statements": [ { "kind": { - "Assign": [ + "StorageDead": 3 + } + } + ], + "terminator": { + "kind": { + "Call": { + "args": [ { - "local": 2, - "projection": [] + "Move": { + "local": 1, + "projection": [] + } }, { - "Discriminant": { - "local": 1, + "Move": { + "local": 2, "projection": [] } } - ] - }, - "span": 90 - } - ], - "terminator": { - "kind": { - "SwitchInt": { - "discr": { - "Move": { - "local": 2, - "projection": [] + ], + "destination": { + "local": 0, + "projection": [] + }, + "func": { + "Constant": { + "const_": { + "kind": "ZeroSized" + }, + "user_ty": null } }, - "targets": { - "branches": [ - [ - 0, - 3 - ], - [ - 1, - 2 - ] - ], - "otherwise": 1 - } + "target": 6, + "unwind": "Continue" } - }, - "span": 89 - } - }, - { - "statements": [], - "terminator": { - "kind": "Unreachable", - "span": 90 + } } }, { "statements": [ { "kind": { - "StorageLive": 3 - }, - "span": 94 + "StorageDead": 3 + } + }, + { + "kind": { + "StorageLive": 5 + } + }, + { + "kind": { + "StorageLive": 6 + } }, { "kind": { "Assign": [ { - "local": 3, + "local": 6, "projection": [] }, { "Use": { - "Move": { - "local": 1, + "Copy": { + "local": 2, "projection": [ + "Deref", { - "Downcast": 1 + "Field": [ + 0, + 0 + ] }, { "Field": [ 0, - 9 + 0 ] } ] @@ -1835,62 +1747,85 @@ } } ] - }, - "span": 94 - }, - { - "kind": { - "StorageLive": 5 - }, - "span": 95 + } }, { "kind": { "Assign": [ { - "local": 6, + "local": 5, "projection": [] }, { - "Ref": [ + "BinaryOp": [ + "BitAnd", { - "kind": "ReErased" + "Move": { + "local": 6, + "projection": [] + } }, - "Shared", { - "local": 3, - "projection": [] - } - ] - } + "Constant": { + "const_": { + "kind": { + "Allocated": { + "align": 4, + "bytes": [ + 32, + 0, + 0, + 0 + ], + "mutability": "Mut", + "provenance": { + "ptrs": [] + } + } + } + }, + "user_ty": null + } + } + ] + } ] - }, - "span": 95 + } }, { "kind": { - "Assign": [ - { + "StorageDead": 6 + } + } + ], + "terminator": { + "kind": { + "SwitchInt": { + "discr": { + "Move": { "local": 5, "projection": [] - }, - { - "Cast": [ - { - "PointerCoercion": "Unsize" - }, - { - "Copy": { - "local": 6, - "projection": [] - } - }, - 40 - ] } - ] - }, - "span": 95 + }, + "targets": { + "branches": [ + [ + 0, + 4 + ] + ], + "otherwise": 3 + } + } + } + } + }, + { + "statements": [ + { + "kind": { + "StorageDead": 5 + } } ], "terminator": { @@ -1898,168 +1833,119 @@ "Call": { "args": [ { - "Constant": { - "const_": { - "id": 15, - "kind": { - "Allocated": { - "align": 8, - "bytes": [ - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 43, - 0, - 0, - 0, - 0, - 0, - 0, - 0 - ], - "mutability": "Mut", - "provenance": { - "ptrs": [ - [ - 0, - 0 - ] - ] - } - } - } - }, - "span": 92, - "user_ty": null + "Move": { + "local": 1, + "projection": [] } }, { "Move": { - "local": 5, + "local": 2, "projection": [] } } ], "destination": { - "local": 4, + "local": 0, "projection": [] }, "func": { "Constant": { "const_": { - "id": 14, "kind": "ZeroSized" }, - "span": 91, "user_ty": null } }, - "target": null, - "unwind": { - "Cleanup": 4 - } + "target": 5, + "unwind": "Continue" } - }, - "span": 93 + } } }, { "statements": [ { "kind": { - "Assign": [ + "StorageDead": 5 + } + } + ], + "terminator": { + "kind": { + "Call": { + "args": [ { - "local": 0, - "projection": [] + "Move": { + "local": 1, + "projection": [] + } }, { - "Use": { - "Move": { - "local": 1, - "projection": [ - { - "Downcast": 0 - }, - { - "Field": [ - 0, - 41 - ] - } - ] - } + "Move": { + "local": 2, + "projection": [] } } - ] - }, - "span": 97 + ], + "destination": { + "local": 0, + "projection": [] + }, + "func": { + "Constant": { + "const_": { + "kind": "ZeroSized" + }, + "user_ty": null + } + }, + "target": 5, + "unwind": "Continue" + } } - ], - "terminator": { - "kind": "Return", - "span": 96 } }, { "statements": [], "terminator": { "kind": { - "Drop": { - "place": { - "local": 3, - "projection": [] - }, - "target": 5, - "unwind": "Terminate" + "Goto": { + "target": 6 } - }, - "span": 98 + } } }, { "statements": [], "terminator": { - "kind": "Resume", - "span": 99 + "kind": "Return" } } ], "locals": [ { - "mutability": "Mut", - "span": 100 + "mutability": "Mut" }, { - "mutability": "Not", - "span": 101 + "mutability": "Not" }, { - "mutability": "Mut", - "span": 102 + "mutability": "Not" }, { - "mutability": "Not", - "span": 94 + "mutability": "Mut" }, { - "mutability": "Mut", - "span": 93 + "mutability": "Mut" }, { - "mutability": "Mut", - "span": 95 + "mutability": "Mut" }, { - "mutability": "Not", - "span": 95 + "mutability": "Mut" } ], - "span": 99, "spread_arg": null, "var_debug_info": [ { @@ -2067,8 +1953,7 @@ "composite": null, "name": "self", "source_info": { - "scope": 0, - "span": 101 + "scope": 0 }, "value": { "Place": { @@ -2078,394 +1963,125 @@ } }, { - "argument_index": null, + "argument_index": 2, "composite": null, - "name": "t", + "name": "f", "source_info": { - "scope": 1, - "span": 97 + "scope": 0 }, "value": { "Place": { - "local": 0, + "local": 2, "projection": [] } } }, { - "argument_index": null, + "argument_index": 1, "composite": null, - "name": "e", + "name": "self", "source_info": { - "scope": 2, - "span": 94 + "scope": 1 }, "value": { "Place": { - "local": 3, + "local": 2, + "projection": [] + } + } + }, + { + "argument_index": 1, + "composite": null, + "name": "self", + "source_info": { + "scope": 2 + }, + "value": { + "Place": { + "local": 2, "projection": [] } } } ] }, - "id": 9, - "name": "std::result::Result::::unwrap" + "name": "core::fmt::num::::fmt" } }, - "symbol_name": "_ZN4core6result19Result$LT$T$C$E$GT$6unwrap17h" + "symbol_name": "_ZN4core3fmt3num49_$LT$impl$u20$core..fmt..Debug$u20$for$u20$u8$GT$3fmt17h" }, { "details": null, "mono_item_kind": { "MonoItemFn": { "body": { - "arg_count": 1, + "arg_count": 2, "blocks": [ { - "statements": [ - { - "kind": { - "StorageLive": 2 - }, - "span": 16 - }, - { - "kind": { - "StorageLive": 3 - }, - "span": 15 - }, - { - "kind": { - "StorageLive": 4 - }, - "span": 17 - }, - { - "kind": { - "Assign": [ + "statements": [], + "terminator": { + "kind": { + "Call": { + "args": [ { - "local": 4, - "projection": [] + "Move": { + "local": 1, + "projection": [ + "Deref" + ] + } }, - { - "Use": { - "Copy": { - "local": 1, - "projection": [ - "Deref", - { - "Field": [ - 0, - 7 - ] - } - ] - } - } - } - ] - }, - "span": 17 - } - ], - "terminator": { - "kind": { - "Call": { - "args": [ { "Move": { - "local": 4, + "local": 2, "projection": [] } } ], "destination": { - "local": 3, + "local": 0, "projection": [] }, "func": { "Constant": { "const_": { - "id": 1, "kind": "ZeroSized" }, - "span": 14, "user_ty": null } }, "target": 1, "unwind": "Continue" } - }, - "span": 15 - } - }, - { - "statements": [ - { - "kind": { - "StorageDead": 4 - }, - "span": 19 } - ], - "terminator": { - "kind": { - "Call": { - "args": [ - { - "Move": { - "local": 3, - "projection": [] - } - } - ], - "destination": { - "local": 2, - "projection": [] - }, - "func": { - "Constant": { - "const_": { - "id": 2, - "kind": "ZeroSized" - }, - "span": 18, - "user_ty": null - } - }, - "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 - } - ], + "statements": [], "terminator": { - "kind": "Return", - "span": 20 + "kind": "Return" } } ], "locals": [ { - "mutability": "Mut", - "span": 28 - }, - { - "mutability": "Mut", - "span": 3 - }, - { - "mutability": "Mut", - "span": 16 - }, - { - "mutability": "Mut", - "span": 15 - }, - { - "mutability": "Mut", - "span": 17 + "mutability": "Mut" }, { - "mutability": "Mut", - "span": 22 + "mutability": "Not" }, { - "mutability": "Mut", - "span": 23 + "mutability": "Not" } ], - "span": 3, - "spread_arg": null, - "var_debug_info": [ - { - "argument_index": null, - "composite": null, - "name": "main", - "source_info": { - "scope": 0, - "span": 9 - }, - "value": { - "Place": { - "local": 1, - "projection": [ - "Deref", - { - "Field": [ - 0, - 7 - ] - } - ] - } - } - }, - { - "argument_index": 1, - "composite": null, - "name": "self", - "source_info": { - "scope": 1, - "span": 29 - }, - "value": { - "Place": { - "local": 2, - "projection": [] - } - } - }, - { - "argument_index": 1, - "composite": null, - "name": "self", - "source_info": { - "scope": 2, - "span": 30 - }, - "value": { - "Place": { - "local": 5, - "projection": [] - } - } - } - ] + "spread_arg": 2, + "var_debug_info": [] }, - "id": 1, - "name": "std::rt::lang_start::<()>::{closure#0}" + "name": "<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once" } }, - "symbol_name": "_ZN3std2rt10lang_start28_$u7b$$u7b$closure$u7d$$u7d$17h" + "symbol_name": "_ZN4core3ops8function6FnOnce40call_once$u7b$$u7b$vtable.shim$u7d$$u7d$17h" }, { "details": null, @@ -2493,37 +2109,30 @@ "target": 1, "unwind": "Continue" } - }, - "span": 65 + } } }, { "statements": [], "terminator": { - "kind": "Return", - "span": 65 + "kind": "Return" } } ], "locals": [ { - "mutability": "Mut", - "span": 65 + "mutability": "Mut" }, { - "mutability": "Not", - "span": 65 + "mutability": "Not" }, { - "mutability": "Not", - "span": 65 + "mutability": "Not" } ], - "span": 65, "spread_arg": 2, "var_debug_info": [] }, - "id": 4, "name": ">::call_once" } }, @@ -2537,94 +2146,13 @@ "arg_count": 2, "blocks": [ { - "statements": [], - "terminator": { - "kind": { - "Call": { - "args": [ + "statements": [ + { + "kind": { + "Assign": [ { - "Move": { - "local": 1, - "projection": [ - "Deref" - ] - } - }, - { - "Move": { - "local": 2, - "projection": [] - } - } - ], - "destination": { - "local": 0, - "projection": [] - }, - "func": { - "Constant": { - "const_": { - "id": 11, - "kind": "ZeroSized" - }, - "span": 65, - "user_ty": null - } - }, - "target": 1, - "unwind": "Continue" - } - }, - "span": 65 - } - }, - { - "statements": [], - "terminator": { - "kind": "Return", - "span": 65 - } - } - ], - "locals": [ - { - "mutability": "Mut", - "span": 65 - }, - { - "mutability": "Not", - "span": 65 - }, - { - "mutability": "Not", - "span": 65 - } - ], - "span": 65, - "spread_arg": 2, - "var_debug_info": [] - }, - "id": 4, - "name": "<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once" - } - }, - "symbol_name": "_ZN4core3ops8function6FnOnce40call_once$u7b$$u7b$vtable.shim$u7d$$u7d$17h" - }, - { - "details": null, - "mono_item_kind": { - "MonoItemFn": { - "body": { - "arg_count": 2, - "blocks": [ - { - "statements": [ - { - "kind": { - "Assign": [ - { - "local": 3, - "projection": [] + "local": 3, + "projection": [] }, { "Ref": [ @@ -2643,8 +2171,7 @@ ] } ] - }, - "span": 65 + } } ], "terminator": { @@ -2671,10 +2198,8 @@ "func": { "Constant": { "const_": { - "id": 12, "kind": "ZeroSized" }, - "span": 65, "user_ty": null } }, @@ -2683,8 +2208,7 @@ "Cleanup": 3 } } - }, - "span": 65 + } } }, { @@ -2699,15 +2223,13 @@ "target": 2, "unwind": "Continue" } - }, - "span": 65 + } } }, { "statements": [], "terminator": { - "kind": "Return", - "span": 65 + "kind": "Return" } }, { @@ -2722,41 +2244,33 @@ "target": 4, "unwind": "Terminate" } - }, - "span": 65 + } } }, { "statements": [], "terminator": { - "kind": "Resume", - "span": 65 + "kind": "Resume" } } ], "locals": [ { - "mutability": "Mut", - "span": 65 + "mutability": "Mut" }, { - "mutability": "Not", - "span": 65 + "mutability": "Not" }, { - "mutability": "Not", - "span": 65 + "mutability": "Not" }, { - "mutability": "Not", - "span": 65 + "mutability": "Not" } ], - "span": 65, "spread_arg": 2, "var_debug_info": [] }, - "id": 4, "name": "<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once" } }, @@ -2767,100 +2281,85 @@ "mono_item_kind": { "MonoItemFn": { "body": { - "arg_count": 2, + "arg_count": 1, + "blocks": [ + { + "statements": [], + "terminator": { + "kind": "Return" + } + } + ], + "locals": [ + { + "mutability": "Mut" + }, + { + "mutability": "Not" + } + ], + "spread_arg": null, + "var_debug_info": [] + }, + "name": "std::ptr::drop_in_place::" + } + }, + "symbol_name": "_ZN4core3ptr23drop_in_place$LT$u8$GT$17h" + }, + { + "details": null, + "mono_item_kind": { + "MonoItemFn": { + "body": { + "arg_count": 1, + "blocks": [ + { + "statements": [], + "terminator": { + "kind": "Return" + } + } + ], + "locals": [ + { + "mutability": "Mut" + }, + { + "mutability": "Not" + } + ], + "spread_arg": null, + "var_debug_info": [] + }, + "name": "std::ptr::drop_in_place::<{closure@std::rt::lang_start<()>::{closure#0}}>" + } + }, + "symbol_name": "_ZN4core3ptr85drop_in_place$LT$std..rt..lang_start$LT$$LP$$RP$$GT$..$u7b$$u7b$closure$u7d$$u7d$$GT$17h" + }, + { + "details": null, + "mono_item_kind": { + "MonoItemFn": { + "body": { + "arg_count": 1, "blocks": [ { "statements": [ - { - "kind": { - "StorageLive": 3 - }, - "span": 44 - }, - { - "kind": { - "StorageLive": 4 - }, - "span": 45 - }, { "kind": { "Assign": [ { - "local": 4, + "local": 2, "projection": [] }, { - "Use": { - "Copy": { - "local": 2, - "projection": [ - "Deref", - { - "Field": [ - 0, - 21 - ] - } - ] - } + "Discriminant": { + "local": 1, + "projection": [] } } ] - }, - "span": 45 - }, - { - "kind": { - "Assign": [ - { - "local": 3, - "projection": [] - }, - { - "BinaryOp": [ - "BitAnd", - { - "Move": { - "local": 4, - "projection": [] - } - }, - { - "Constant": { - "const_": { - "id": 6, - "kind": { - "Allocated": { - "align": 4, - "bytes": [ - 16, - 0, - 0, - 0 - ], - "mutability": "Mut", - "provenance": { - "ptrs": [] - } - } - } - }, - "span": 32, - "user_ty": null - } - } - ] - } - ] - }, - "span": 44 - }, - { - "kind": { - "StorageDead": 4 - }, - "span": 46 + } } ], "terminator": { @@ -2868,7 +2367,7 @@ "SwitchInt": { "discr": { "Move": { - "local": 3, + "local": 2, "projection": [] } }, @@ -2877,99 +2376,69 @@ [ 0, 2 + ], + [ + 1, + 3 ] ], "otherwise": 1 } } - }, - "span": 43 + } } }, { - "statements": [ - { - "kind": { - "StorageDead": 3 - }, - "span": 43 - } - ], + "statements": [], + "terminator": { + "kind": "Unreachable" + } + }, + { + "statements": [], "terminator": { "kind": { "Call": { - "args": [ - { - "Move": { - "local": 1, - "projection": [] - } - }, - { - "Move": { - "local": 2, - "projection": [] - } - } - ], + "args": [], "destination": { - "local": 0, + "local": 3, "projection": [] }, "func": { "Constant": { "const_": { - "id": 7, "kind": "ZeroSized" }, - "span": 47, "user_ty": null } }, - "target": 6, + "target": null, "unwind": "Continue" } - }, - "span": 48 + } } }, { "statements": [ - { - "kind": { - "StorageDead": 3 - }, - "span": 43 - }, - { - "kind": { - "StorageLive": 5 - }, - "span": 50 - }, - { - "kind": { - "StorageLive": 6 - }, - "span": 51 - }, { "kind": { "Assign": [ { - "local": 6, + "local": 0, "projection": [] }, { "Use": { - "Copy": { - "local": 2, + "Move": { + "local": 1, "projection": [ - "Deref", + { + "Downcast": 1 + }, { "Field": [ 0, - 21 + 0 ] } ] @@ -2977,60 +2446,89 @@ } } ] - }, - "span": 51 - }, + } + } + ], + "terminator": { + "kind": "Return" + } + } + ], + "locals": [ + { + "mutability": "Mut" + }, + { + "mutability": "Not" + }, + { + "mutability": "Mut" + }, + { + "mutability": "Mut" + } + ], + "spread_arg": null, + "var_debug_info": [ + { + "argument_index": 1, + "composite": null, + "name": "self", + "source_info": { + "scope": 0 + }, + "value": { + "Place": { + "local": 1, + "projection": [] + } + } + }, + { + "argument_index": null, + "composite": null, + "name": "val", + "source_info": { + "scope": 1 + }, + "value": { + "Place": { + "local": 0, + "projection": [] + } + } + } + ] + }, + "name": "std::option::Option::::unwrap" + } + }, + "symbol_name": "_ZN4core6option15Option$LT$T$GT$6unwrap17h" + }, + { + "details": null, + "mono_item_kind": { + "MonoItemFn": { + "body": { + "arg_count": 1, + "blocks": [ + { + "statements": [ { "kind": { "Assign": [ { - "local": 5, + "local": 2, "projection": [] }, { - "BinaryOp": [ - "BitAnd", - { - "Move": { - "local": 6, - "projection": [] - } - }, - { - "Constant": { - "const_": { - "id": 8, - "kind": { - "Allocated": { - "align": 4, - "bytes": [ - 32, - 0, - 0, - 0 - ], - "mutability": "Mut", - "provenance": { - "ptrs": [] - } - } - } - }, - "span": 32, - "user_ty": null - } - } - ] + "Discriminant": { + "local": 1, + "projection": [] + } } ] - }, - "span": 50 - }, - { - "kind": { - "StorageDead": 6 - }, - "span": 52 + } } ], "terminator": { @@ -3038,7 +2536,7 @@ "SwitchInt": { "discr": { "Move": { - "local": 5, + "local": 2, "projection": [] } }, @@ -3046,160 +2544,222 @@ "branches": [ [ 0, - 4 + 3 + ], + [ + 1, + 2 ] ], - "otherwise": 3 + "otherwise": 1 } } - }, - "span": 49 + } + } + }, + { + "statements": [], + "terminator": { + "kind": "Unreachable" } }, { "statements": [ { "kind": { - "StorageDead": 5 - }, - "span": 49 - } - ], - "terminator": { - "kind": { - "Call": { - "args": [ + "Assign": [ { - "Move": { - "local": 1, - "projection": [] - } + "local": 3, + "projection": [] }, { - "Move": { - "local": 2, - "projection": [] + "Use": { + "Move": { + "local": 1, + "projection": [ + { + "Downcast": 1 + }, + { + "Field": [ + 0, + 0 + ] + } + ] + } } } - ], - "destination": { - "local": 0, - "projection": [] - }, - "func": { - "Constant": { - "const_": { - "id": 9, - "kind": "ZeroSized" - }, - "span": 53, - "user_ty": null - } - }, - "target": 5, - "unwind": "Continue" + ] } }, - "span": 54 - } - }, - { - "statements": [ { "kind": { - "StorageDead": 5 - }, - "span": 49 + "Assign": [ + { + "local": 0, + "projection": [] + }, + { + "Aggregate": [ + { + "Adt": [ + 0, + 1, + [ + { + "Type": 0 + } + ], + null, + null + ] + }, + [ + { + "Copy": { + "local": 3, + "projection": [] + } + } + ] + ] + } + ] + } } ], "terminator": { "kind": { - "Call": { - "args": [ + "Goto": { + "target": 6 + } + } + } + }, + { + "statements": [ + { + "kind": { + "Assign": [ { - "Move": { - "local": 1, - "projection": [] - } + "local": 0, + "projection": [] }, { - "Move": { - "local": 2, - "projection": [] - } - } - ], - "destination": { - "local": 0, - "projection": [] - }, - "func": { - "Constant": { - "const_": { - "id": 10, - "kind": "ZeroSized" - }, - "span": 55, - "user_ty": null + "Aggregate": [ + { + "Adt": [ + 0, + 0, + [ + { + "Type": 0 + } + ], + null, + null + ] + }, + [] + ] } - }, - "target": 5, - "unwind": "Continue" + ] } - }, - "span": 56 + } + ], + "terminator": { + "kind": { + "Goto": { + "target": 6 + } + } + } + }, + { + "statements": [], + "terminator": { + "kind": "Return" } }, { "statements": [], "terminator": { "kind": { - "Goto": { - "target": 6 + "Drop": { + "place": { + "local": 1, + "projection": [] + }, + "target": 4, + "unwind": "Continue" } - }, - "span": 57 + } } }, { - "statements": [], + "statements": [ + { + "kind": { + "Assign": [ + { + "local": 4, + "projection": [] + }, + { + "Discriminant": { + "local": 1, + "projection": [] + } + } + ] + } + } + ], "terminator": { - "kind": "Return", - "span": 58 + "kind": { + "SwitchInt": { + "discr": { + "Move": { + "local": 4, + "projection": [] + } + }, + "targets": { + "branches": [ + [ + 1, + 4 + ], + [ + 0, + 5 + ] + ], + "otherwise": 1 + } + } + } } } ], "locals": [ { - "mutability": "Mut", - "span": 59 - }, - { - "mutability": "Not", - "span": 60 + "mutability": "Mut" }, { - "mutability": "Not", - "span": 61 + "mutability": "Not" }, { - "mutability": "Mut", - "span": 44 + "mutability": "Mut" }, { - "mutability": "Mut", - "span": 45 + "mutability": "Not" }, { - "mutability": "Mut", - "span": 50 - }, - { - "mutability": "Mut", - "span": 51 + "mutability": "Mut" } ], - "span": 64, "spread_arg": null, "var_debug_info": [ { @@ -3207,8 +2767,7 @@ "composite": null, "name": "self", "source_info": { - "scope": 0, - "span": 60 + "scope": 0 }, "value": { "Place": { @@ -3218,132 +2777,129 @@ } }, { - "argument_index": 2, + "argument_index": null, "composite": null, - "name": "f", + "name": "x", "source_info": { - "scope": 0, - "span": 61 + "scope": 1 }, "value": { "Place": { - "local": 2, + "local": 3, "projection": [] } } - }, + } + ] + }, + "name": "std::result::Result::::err" + } + }, + "symbol_name": "_ZN4core6result19Result$LT$T$C$E$GT$3err17h" + }, + { + "details": null, + "mono_item_kind": { + "MonoItemFn": { + "body": { + "arg_count": 1, + "blocks": [ { - "argument_index": 1, - "composite": null, - "name": "self", - "source_info": { - "scope": 1, - "span": 62 - }, - "value": { - "Place": { - "local": 2, - "projection": [] + "statements": [ + { + "kind": { + "Assign": [ + { + "local": 2, + "projection": [] + }, + { + "Discriminant": { + "local": 1, + "projection": [] + } + } + ] + } } - } - }, - { - "argument_index": 1, - "composite": null, - "name": "self", - "source_info": { - "scope": 2, - "span": 63 - }, - "value": { - "Place": { - "local": 2, - "projection": [] + ], + "terminator": { + "kind": { + "SwitchInt": { + "discr": { + "Move": { + "local": 2, + "projection": [] + } + }, + "targets": { + "branches": [ + [ + 0, + 3 + ], + [ + 1, + 2 + ] + ], + "otherwise": 1 + } + } } } - } - ] - }, - "id": 3, - "name": "core::fmt::num::::fmt" - } - }, - "symbol_name": "_ZN4core3fmt3num49_$LT$impl$u20$core..fmt..Debug$u20$for$u20$u8$GT$3fmt17h" - }, - { - "details": null, - "mono_item_kind": { - "MonoItemFn": { - "body": { - "arg_count": 4, - "blocks": [ + }, + { + "statements": [], + "terminator": { + "kind": "Unreachable" + } + }, { "statements": [ { "kind": { - "StorageLive": 5 - }, - "span": 1 - }, - { - "kind": { - "StorageLive": 6 - }, - "span": 2 - }, - { - "kind": { - "StorageLive": 8 - }, - "span": 3 + "StorageLive": 3 + } }, { "kind": { "Assign": [ { - "local": 8, + "local": 3, "projection": [] }, { - "Aggregate": [ - { - "Closure": [ - 1, - [ - { - "Type": 1 - }, - { - "Type": 2 - }, - { - "Type": 3 - }, - { - "Type": 4 - } - ] - ] - }, - [ - { - "Copy": { - "local": 1, - "projection": [] + "Use": { + "Move": { + "local": 1, + "projection": [ + { + "Downcast": 1 + }, + { + "Field": [ + 0, + 0 + ] } - } - ] - ] + ] + } + } } ] - }, - "span": 3 + } + }, + { + "kind": { + "StorageLive": 5 + } }, { "kind": { "Assign": [ { - "local": 7, + "local": 6, "projection": [] }, { @@ -3353,20 +2909,19 @@ }, "Shared", { - "local": 8, + "local": 3, "projection": [] } ] } ] - }, - "span": 2 + } }, { "kind": { "Assign": [ { - "local": 6, + "local": 5, "projection": [] }, { @@ -3376,16 +2931,15 @@ }, { "Copy": { - "local": 7, + "local": 6, "projection": [] } }, - 5 + 0 ] } ] - }, - "span": 2 + } } ], "terminator": { @@ -3393,59 +2947,73 @@ "Call": { "args": [ { - "Move": { - "local": 6, - "projection": [] - } - }, - { - "Move": { - "local": 2, - "projection": [] - } - }, - { - "Move": { - "local": 3, - "projection": [] + "Constant": { + "const_": { + "kind": { + "Allocated": { + "align": 8, + "bytes": [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 43, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "mutability": "Mut", + "provenance": { + "ptrs": [ + [ + 0, + 0 + ] + ] + } + } + } + }, + "user_ty": null } }, { "Move": { - "local": 4, + "local": 5, "projection": [] } } ], "destination": { - "local": 5, + "local": 4, "projection": [] }, "func": { "Constant": { "const_": { - "id": 0, "kind": "ZeroSized" }, - "span": 0, "user_ty": null } }, - "target": 1, - "unwind": "Continue" + "target": null, + "unwind": { + "Cleanup": 4 + } } - }, - "span": 1 + } } }, { "statements": [ - { - "kind": { - "StorageDead": 6 - }, - "span": 5 - }, { "kind": { "Assign": [ @@ -3455,8 +3023,8 @@ }, { "Use": { - "Copy": { - "local": 5, + "Move": { + "local": 1, "projection": [ { "Downcast": 0 @@ -3464,7 +3032,7 @@ { "Field": [ 0, - 6 + 0 ] } ] @@ -3472,76 +3040,66 @@ } } ] - }, - "span": 6 - }, - { - "kind": { - "StorageDead": 8 - }, - "span": 7 - }, - { - "kind": { - "StorageDead": 5 - }, - "span": 7 + } } ], "terminator": { - "kind": "Return", - "span": 4 + "kind": "Return" } - } - ], - "locals": [ - { - "mutability": "Mut", - "span": 8 }, { - "mutability": "Not", - "span": 9 + "statements": [], + "terminator": { + "kind": { + "Drop": { + "place": { + "local": 3, + "projection": [] + }, + "target": 5, + "unwind": "Terminate" + } + } + } }, { - "mutability": "Not", - "span": 10 + "statements": [], + "terminator": { + "kind": "Resume" + } + } + ], + "locals": [ + { + "mutability": "Mut" }, { - "mutability": "Not", - "span": 11 + "mutability": "Not" }, { - "mutability": "Not", - "span": 12 + "mutability": "Mut" }, { - "mutability": "Mut", - "span": 1 + "mutability": "Not" }, { - "mutability": "Mut", - "span": 2 + "mutability": "Mut" }, { - "mutability": "Not", - "span": 2 + "mutability": "Mut" }, { - "mutability": "Not", - "span": 3 + "mutability": "Not" } ], - "span": 13, "spread_arg": null, "var_debug_info": [ { "argument_index": 1, "composite": null, - "name": "main", + "name": "self", "source_info": { - "scope": 0, - "span": 9 + "scope": 0 }, "value": { "Place": { @@ -3551,27 +3109,25 @@ } }, { - "argument_index": 2, + "argument_index": null, "composite": null, - "name": "argc", + "name": "t", "source_info": { - "scope": 0, - "span": 10 + "scope": 1 }, "value": { "Place": { - "local": 2, + "local": 0, "projection": [] } } }, { - "argument_index": 3, + "argument_index": null, "composite": null, - "name": "argv", + "name": "e", "source_info": { - "scope": 0, - "span": 11 + "scope": 2 }, "value": { "Place": { @@ -3579,44 +3135,75 @@ "projection": [] } } - }, + } + ] + }, + "name": "std::result::Result::::unwrap" + } + }, + "symbol_name": "_ZN4core6result19Result$LT$T$C$E$GT$6unwrap17h" + }, + { + "details": null, + "mono_item_kind": { + "MonoItemFn": { + "body": { + "arg_count": 1, + "blocks": [ { - "argument_index": 4, - "composite": null, - "name": "sigpipe", - "source_info": { - "scope": 0, - "span": 12 - }, - "value": { - "Place": { - "local": 4, - "projection": [] + "statements": [ + { + "kind": { + "Assign": [ + { + "local": 0, + "projection": [] + }, + { + "Use": { + "Constant": { + "const_": { + "kind": { + "Allocated": { + "align": 1, + "bytes": [ + 0 + ], + "mutability": "Mut", + "provenance": { + "ptrs": [] + } + } + } + }, + "user_ty": null + } + } + } + ] + } } + ], + "terminator": { + "kind": "Return" } + } + ], + "locals": [ + { + "mutability": "Mut" }, { - "argument_index": null, - "composite": null, - "name": "v", - "source_info": { - "scope": 1, - "span": 6 - }, - "value": { - "Place": { - "local": 0, - "projection": [] - } - } + "mutability": "Not" } - ] + ], + "spread_arg": null, + "var_debug_info": [] }, - "id": 0, - "name": "std::rt::lang_start::<()>" + "name": "<() as std::process::Termination>::report" } }, - "symbol_name": "_ZN3std2rt10lang_start17h" + "symbol_name": "_ZN54_$LT$$LP$$RP$$u20$as$u20$std..process..Termination$GT$6report17h" } ], "types": [ @@ -3683,8 +3270,7 @@ "discriminants": [ 0, 1, - 2, - 3 + 2 ], "fields": "elided", "layout": { @@ -3692,7 +3278,7 @@ "Scalar": { "Initialized": { "valid_range": { - "end": 3, + "end": 2, "start": 0 }, "value": { @@ -3722,7 +3308,7 @@ "tag": { "Initialized": { "valid_range": { - "end": 3, + "end": 2, "start": 0 }, "value": { @@ -3798,7 +3384,81 @@ "index": 2 } } + } + ] + } + } + }, + "name": "std::fmt::Alignment" + } + } + ], + [ + { + "EnumType": { + "discriminants": [ + 0, + 1 + ], + "fields": "elided", + "layout": { + "abi": { + "Scalar": { + "Initialized": { + "valid_range": { + "end": 3, + "start": 0 }, + "value": { + "Int": { + "length": "I8", + "signed": false + } + } + } + } + }, + "abi_align": 1, + "fields": { + "Arbitrary": { + "offsets": [ + { + "num_bits": 0 + } + ] + } + }, + "size": { + "num_bits": 8 + }, + "variants": { + "Multiple": { + "tag": { + "Initialized": { + "valid_range": { + "end": 3, + "start": 0 + }, + "value": { + "Int": { + "length": "I8", + "signed": false + } + } + } + }, + "tag_encoding": { + "Niche": { + "niche_start": 3, + "niche_variants": { + "end": 0, + "start": 0 + }, + "untagged_variant": 1 + } + }, + "tag_field": 0, + "variants": [ { "abi": { "Aggregate": { @@ -3811,12 +3471,48 @@ "offsets": [] } }, + "size": { + "num_bits": 0 + }, + "variants": { + "Single": { + "index": 0 + } + } + }, + { + "abi": { + "Scalar": { + "Initialized": { + "valid_range": { + "end": 2, + "start": 0 + }, + "value": { + "Int": { + "length": "I8", + "signed": false + } + } + } + } + }, + "abi_align": 1, + "fields": { + "Arbitrary": { + "offsets": [ + { + "num_bits": 0 + } + ] + } + }, "size": { "num_bits": 8 }, "variants": { "Single": { - "index": 3 + "index": 1 } } } @@ -3824,7 +3520,7 @@ } } }, - "name": "core::fmt::rt::Alignment" + "name": "std::option::Option" } } ], @@ -4111,54 +3807,6 @@ } } ], - [ - { - "EnumType": { - "discriminants": [ - 0, - 1 - ], - "fields": "elided", - "layout": { - "abi": { - "Scalar": { - "Initialized": { - "valid_range": { - "end": 18446744073709551615, - "start": 0 - }, - "value": { - "Int": { - "length": "I64", - "signed": true - } - } - } - } - }, - "abi_align": 8, - "fields": { - "Arbitrary": { - "offsets": [ - { - "num_bits": 0 - } - ] - } - }, - "size": { - "num_bits": 64 - }, - "variants": { - "Single": { - "index": 0 - } - } - }, - "name": "std::result::Result" - } - } - ], [ { "EnumType": { @@ -4537,28 +4185,61 @@ "Arbitrary": { "offsets": [ { - "num_bits": 416 + "num_bits": 0 }, { "num_bits": 384 + } + ] + } + }, + "size": { + "num_bits": 512 + }, + "variants": { + "Single": { + "index": 0 + } + } + }, + "name": "std::fmt::Formatter<'_>" + } + } + ], + [ + { + "StructType": { + "fields": "elided", + "layout": { + "abi": { + "Aggregate": { + "sized": true + } + }, + "abi_align": 8, + "fields": { + "Arbitrary": { + "offsets": [ + { + "num_bits": 288 + }, + { + "num_bits": 256 }, { - "num_bits": 448 + "num_bits": 320 }, { "num_bits": 0 }, { "num_bits": 128 - }, - { - "num_bits": 256 } ] } }, "size": { - "num_bits": 512 + "num_bits": 384 }, "variants": { "Single": { @@ -4566,7 +4247,7 @@ } } }, - "name": "std::fmt::Formatter<'_>" + "name": "std::fmt::FormattingOptions" } } ], @@ -5022,39 +4703,6 @@ } } ], - [ - { - "RefType": { - "layout": { - "abi": { - "Scalar": { - "Initialized": { - "valid_range": { - "end": 18446744073709551615, - "start": 1 - }, - "value": { - "Pointer": 0 - } - } - } - }, - "abi_align": 8, - "fields": "Primitive", - "size": { - "num_bits": 64 - }, - "variants": { - "Single": { - "index": 0 - } - } - }, - "mutability": "Not", - "pointee_type": "elided" - } - } - ], [ { "RefType": { diff --git a/tests/integration/programs/primitive-type-bounds.smir.json.expected b/tests/integration/expected/nightly-2025-03-01/primitive-type-bounds.smir.json.expected similarity index 79% rename from tests/integration/programs/primitive-type-bounds.smir.json.expected rename to tests/integration/expected/nightly-2025-03-01/primitive-type-bounds.smir.json.expected index dfff4114..f84e73b4 100644 --- a/tests/integration/programs/primitive-type-bounds.smir.json.expected +++ b/tests/integration/expected/nightly-2025-03-01/primitive-type-bounds.smir.json.expected @@ -108,7 +108,6 @@ { "Constant": { "const_": { - "id": 9, "kind": { "Allocated": { "align": 4, @@ -125,14 +124,12 @@ } } }, - "span": 50, "user_ty": null } }, { "Constant": { "const_": { - "id": 10, "kind": { "Allocated": { "align": 4, @@ -149,15 +146,13 @@ } } }, - "span": 51, "user_ty": null } } ] } ] - }, - "span": 52 + } } ], "terminator": { @@ -170,7 +165,7 @@ { "Field": [ 1, - 25 + 0 ] } ] @@ -183,7 +178,6 @@ { "Constant": { "const_": { - "id": 9, "kind": { "Allocated": { "align": 4, @@ -200,14 +194,12 @@ } } }, - "span": 50, "user_ty": null } }, { "Constant": { "const_": { - "id": 10, "kind": { "Allocated": { "align": 4, @@ -224,7 +216,6 @@ } } }, - "span": 51, "user_ty": null } } @@ -233,8 +224,7 @@ "target": 1, "unwind": "Continue" } - }, - "span": 52 + } } }, { @@ -254,7 +244,7 @@ { "Field": [ 0, - 26 + 0 ] } ] @@ -262,8 +252,7 @@ } } ] - }, - "span": 52 + } }, { "kind": { @@ -276,7 +265,6 @@ "Use": { "Constant": { "const_": { - "id": 11, "kind": { "Allocated": { "align": 4, @@ -293,14 +281,12 @@ } } }, - "span": 54, "user_ty": null } } } ] - }, - "span": 55 + } }, { "kind": { @@ -327,8 +313,7 @@ ] } ] - }, - "span": 53 + } } ], "terminator": { @@ -350,15 +335,13 @@ "otherwise": 2 } } - }, - "span": 53 + } } }, { "statements": [], "terminator": { - "kind": "Return", - "span": 56 + "kind": "Return" } }, { @@ -370,7 +353,6 @@ { "Constant": { "const_": { - "id": 13, "kind": { "Allocated": { "align": 8, @@ -404,7 +386,6 @@ } } }, - "span": 32, "user_ty": null } } @@ -416,48 +397,38 @@ "func": { "Constant": { "const_": { - "id": 12, "kind": "ZeroSized" }, - "span": 57, "user_ty": null } }, "target": null, "unwind": "Continue" } - }, - "span": 57 + } } } ], "locals": [ { - "mutability": "Mut", - "span": 58 + "mutability": "Mut" }, { - "mutability": "Not", - "span": 59 + "mutability": "Not" }, { - "mutability": "Mut", - "span": 52 + "mutability": "Mut" }, { - "mutability": "Mut", - "span": 53 + "mutability": "Mut" }, { - "mutability": "Mut", - "span": 55 + "mutability": "Mut" }, { - "mutability": "Mut", - "span": 57 + "mutability": "Mut" } ], - "span": 61, "spread_arg": null, "var_debug_info": [ { @@ -465,13 +436,11 @@ "composite": null, "name": "a", "source_info": { - "scope": 1, - "span": 60 + "scope": 1 }, "value": { "Const": { "const_": { - "id": 11, "kind": { "Allocated": { "align": 4, @@ -488,7 +457,6 @@ } } }, - "span": 54, "user_ty": null } } @@ -498,8 +466,7 @@ "composite": null, "name": "b", "source_info": { - "scope": 2, - "span": 59 + "scope": 2 }, "value": { "Place": { @@ -510,7 +477,6 @@ } ] }, - "id": 6, "name": "main" } }, @@ -521,63 +487,134 @@ "mono_item_kind": { "MonoItemFn": { "body": { - "arg_count": 1, - "blocks": [ - { - "statements": [], - "terminator": { - "kind": "Return", - "span": 44 - } - } - ], - "locals": [ - { - "mutability": "Mut", - "span": 44 - }, - { - "mutability": "Not", - "span": 44 - } - ], - "span": 44, - "spread_arg": null, - "var_debug_info": [] - }, - "id": 4, - "name": "std::ptr::drop_in_place::<{closure@std::rt::lang_start<()>::{closure#0}}>" - } - }, - "symbol_name": "_ZN4core3ptr85drop_in_place$LT$std..rt..lang_start$LT$$LP$$RP$$GT$..$u7b$$u7b$closure$u7d$$u7d$$GT$17h" - }, - { - "details": null, - "mono_item_kind": { - "MonoItemFn": { - "body": { - "arg_count": 1, + "arg_count": 4, "blocks": [ { - "statements": [], + "statements": [ + { + "kind": { + "StorageLive": 5 + } + }, + { + "kind": { + "StorageLive": 7 + } + }, + { + "kind": { + "Assign": [ + { + "local": 7, + "projection": [] + }, + { + "Aggregate": [ + { + "Closure": [ + 0, + [ + { + "Type": 0 + }, + { + "Type": 0 + }, + { + "Type": 0 + }, + { + "Type": 0 + } + ] + ] + }, + [ + { + "Copy": { + "local": 1, + "projection": [] + } + } + ] + ] + } + ] + } + }, + { + "kind": { + "Assign": [ + { + "local": 6, + "projection": [] + }, + { + "Ref": [ + { + "kind": "ReErased" + }, + "Shared", + { + "local": 7, + "projection": [] + } + ] + } + ] + } + }, + { + "kind": { + "Assign": [ + { + "local": 5, + "projection": [] + }, + { + "Cast": [ + { + "PointerCoercion": "Unsize" + }, + { + "Copy": { + "local": 6, + "projection": [] + } + }, + 0 + ] + } + ] + } + } + ], "terminator": { "kind": { "Call": { "args": [ { "Move": { - "local": 1, + "local": 5, "projection": [] } }, { - "Constant": { - "const_": { - "id": 4, - "kind": "ZeroSized" - }, - "span": 32, - "user_ty": null + "Move": { + "local": 2, + "projection": [] + } + }, + { + "Move": { + "local": 3, + "projection": [] + } + }, + { + "Move": { + "local": 4, + "projection": [] } } ], @@ -588,90 +625,69 @@ "func": { "Constant": { "const_": { - "id": 3, "kind": "ZeroSized" }, - "span": 31, "user_ty": null } }, "target": 1, "unwind": "Continue" } - }, - "span": 33 + } } }, { - "statements": [], - "terminator": { - "kind": { - "Call": { - "args": [ - { - "Constant": { - "const_": { - "id": 4, - "kind": "ZeroSized" - }, - "span": 32, - "user_ty": null - } - } - ], - "destination": { - "local": 2, - "projection": [] - }, - "func": { - "Constant": { - "const_": { - "id": 5, - "kind": "ZeroSized" - }, - "span": 34, - "user_ty": null - } - }, - "target": 2, - "unwind": "Unreachable" + "statements": [ + { + "kind": { + "StorageDead": 5 } }, - "span": 35 - } - }, - { - "statements": [], + { + "kind": { + "StorageDead": 7 + } + } + ], "terminator": { - "kind": "Return", - "span": 36 + "kind": "Return" } } ], "locals": [ { - "mutability": "Mut", - "span": 37 + "mutability": "Mut" + }, + { + "mutability": "Not" + }, + { + "mutability": "Not" + }, + { + "mutability": "Not" + }, + { + "mutability": "Not" }, { - "mutability": "Not", - "span": 38 + "mutability": "Mut" }, { - "mutability": "Not", - "span": 39 + "mutability": "Not" + }, + { + "mutability": "Not" } ], - "span": 42, "spread_arg": null, "var_debug_info": [ { "argument_index": 1, "composite": null, - "name": "f", + "name": "main", "source_info": { - "scope": 0, - "span": 38 + "scope": 0 }, "value": { "Place": { @@ -681,136 +697,53 @@ } }, { - "argument_index": null, + "argument_index": 2, "composite": null, - "name": "result", + "name": "argc", "source_info": { - "scope": 1, - "span": 40 + "scope": 0 }, "value": { "Place": { - "local": 0, + "local": 2, "projection": [] } } }, { - "argument_index": 1, + "argument_index": 3, "composite": null, - "name": "dummy", + "name": "argv", "source_info": { - "scope": 2, - "span": 41 + "scope": 0 }, "value": { - "Const": { - "const_": { - "id": 4, - "kind": "ZeroSized" - }, - "span": 32, - "user_ty": null + "Place": { + "local": 3, + "projection": [] + } + } + }, + { + "argument_index": 4, + "composite": null, + "name": "sigpipe", + "source_info": { + "scope": 0 + }, + "value": { + "Place": { + "local": 4, + "projection": [] } } } ] }, - "id": 2, - "name": "std::sys::backtrace::__rust_begin_short_backtrace::" + "name": "std::rt::lang_start::<()>" } }, - "symbol_name": "_ZN3std3sys9backtrace28__rust_begin_short_backtrace17h" - }, - { - "details": null, - "mono_item_kind": { - "MonoItemFn": { - "body": { - "arg_count": 1, - "blocks": [ - { - "statements": [ - { - "kind": { - "Assign": [ - { - "local": 0, - "projection": [] - }, - { - "Use": { - "Constant": { - "const_": { - "id": 8, - "kind": { - "Allocated": { - "align": 1, - "bytes": [ - 0 - ], - "mutability": "Mut", - "provenance": { - "ptrs": [] - } - } - } - }, - "span": 46, - "user_ty": null - } - } - } - ] - }, - "span": 46 - } - ], - "terminator": { - "kind": "Return", - "span": 45 - } - } - ], - "locals": [ - { - "mutability": "Mut", - "span": 47 - }, - { - "mutability": "Not", - "span": 48 - } - ], - "span": 49, - "spread_arg": null, - "var_debug_info": [ - { - "argument_index": 1, - "composite": null, - "name": "self", - "source_info": { - "scope": 0, - "span": 48 - }, - "value": { - "Const": { - "const_": { - "id": 4, - "kind": "ZeroSized" - }, - "span": 32, - "user_ty": null - } - } - } - ] - }, - "id": 5, - "name": "<() as std::process::Termination>::report" - } - }, - "symbol_name": "_ZN54_$LT$$LP$$RP$$u20$as$u20$std..process..Termination$GT$6report17h" + "symbol_name": "_ZN3std2rt10lang_start17h" }, { "details": null, @@ -824,20 +757,17 @@ { "kind": { "StorageLive": 2 - }, - "span": 16 + } }, { "kind": { "StorageLive": 3 - }, - "span": 15 + } }, { "kind": { "StorageLive": 4 - }, - "span": 17 + } }, { "kind": { @@ -855,7 +785,7 @@ { "Field": [ 0, - 7 + 0 ] } ] @@ -863,8 +793,7 @@ } } ] - }, - "span": 17 + } } ], "terminator": { @@ -885,18 +814,15 @@ "func": { "Constant": { "const_": { - "id": 1, "kind": "ZeroSized" }, - "span": 14, "user_ty": null } }, "target": 1, "unwind": "Continue" } - }, - "span": 15 + } } }, { @@ -904,8 +830,7 @@ { "kind": { "StorageDead": 4 - }, - "span": 19 + } } ], "terminator": { @@ -926,18 +851,15 @@ "func": { "Constant": { "const_": { - "id": 2, "kind": "ZeroSized" }, - "span": 18, "user_ty": null } }, "target": 2, "unwind": "Continue" } - }, - "span": 16 + } } }, { @@ -945,14 +867,12 @@ { "kind": { "StorageDead": 3 - }, - "span": 21 + } }, { "kind": { "StorageLive": 5 - }, - "span": 22 + } }, { "kind": { @@ -961,42 +881,6 @@ "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": { @@ -1005,13 +889,13 @@ { "Field": [ 0, - 15 + 0 ] }, { "Field": [ 0, - 9 + 0 ] } ] @@ -1019,8 +903,7 @@ } } ] - }, - "span": 23 + } }, { "kind": { @@ -1034,73 +917,52 @@ "IntToInt", { "Move": { - "local": 6, + "local": 5, "projection": [] } }, - 16 + 0 ] } ] - }, - "span": 24 - }, - { - "kind": { - "StorageDead": 6 - }, - "span": 25 + } }, { "kind": { "StorageDead": 5 - }, - "span": 26 + } }, { "kind": { "StorageDead": 2 - }, - "span": 27 + } } ], "terminator": { - "kind": "Return", - "span": 20 + "kind": "Return" } } ], "locals": [ { - "mutability": "Mut", - "span": 28 - }, - { - "mutability": "Mut", - "span": 3 + "mutability": "Mut" }, { - "mutability": "Mut", - "span": 16 + "mutability": "Mut" }, { - "mutability": "Mut", - "span": 15 + "mutability": "Mut" }, { - "mutability": "Mut", - "span": 17 + "mutability": "Mut" }, { - "mutability": "Mut", - "span": 22 + "mutability": "Mut" }, { - "mutability": "Mut", - "span": 23 + "mutability": "Mut" } ], - "span": 3, "spread_arg": null, "var_debug_info": [ { @@ -1108,8 +970,7 @@ "composite": null, "name": "main", "source_info": { - "scope": 0, - "span": 9 + "scope": 0 }, "value": { "Place": { @@ -1119,7 +980,7 @@ { "Field": [ 0, - 7 + 0 ] } ] @@ -1131,8 +992,7 @@ "composite": null, "name": "self", "source_info": { - "scope": 1, - "span": 29 + "scope": 1 }, "value": { "Place": { @@ -1140,25 +1000,9 @@ "projection": [] } } - }, - { - "argument_index": 1, - "composite": null, - "name": "self", - "source_info": { - "scope": 2, - "span": 30 - }, - "value": { - "Place": { - "local": 5, - "projection": [] - } - } } ] }, - "id": 1, "name": "std::rt::lang_start::<()>::{closure#0}" } }, @@ -1169,62 +1013,150 @@ "mono_item_kind": { "MonoItemFn": { "body": { - "arg_count": 2, + "arg_count": 1, "blocks": [ { "statements": [], "terminator": { "kind": { "Call": { - "args": [], + "args": [ + { + "Move": { + "local": 1, + "projection": [] + } + }, + { + "Constant": { + "const_": { + "kind": "ZeroSized" + }, + "user_ty": null + } + } + ], "destination": { "local": 0, "projection": [] }, "func": { - "Move": { - "local": 1, - "projection": [] + "Constant": { + "const_": { + "kind": "ZeroSized" + }, + "user_ty": null } }, "target": 1, "unwind": "Continue" } - }, - "span": 43 + } + } + }, + { + "statements": [], + "terminator": { + "kind": { + "Call": { + "args": [ + { + "Constant": { + "const_": { + "kind": "ZeroSized" + }, + "user_ty": null + } + } + ], + "destination": { + "local": 2, + "projection": [] + }, + "func": { + "Constant": { + "const_": { + "kind": "ZeroSized" + }, + "user_ty": null + } + }, + "target": 2, + "unwind": "Unreachable" + } + } } }, { "statements": [], "terminator": { - "kind": "Return", - "span": 43 + "kind": "Return" } } ], "locals": [ { - "mutability": "Mut", - "span": 43 + "mutability": "Mut" }, { - "mutability": "Not", - "span": 43 + "mutability": "Not" }, { - "mutability": "Not", - "span": 43 + "mutability": "Not" } ], - "span": 43, - "spread_arg": 2, - "var_debug_info": [] + "spread_arg": null, + "var_debug_info": [ + { + "argument_index": 1, + "composite": null, + "name": "f", + "source_info": { + "scope": 0 + }, + "value": { + "Place": { + "local": 1, + "projection": [] + } + } + }, + { + "argument_index": null, + "composite": null, + "name": "result", + "source_info": { + "scope": 1 + }, + "value": { + "Place": { + "local": 0, + "projection": [] + } + } + }, + { + "argument_index": 1, + "composite": null, + "name": "dummy", + "source_info": { + "scope": 2 + }, + "value": { + "Const": { + "const_": { + "kind": "ZeroSized" + }, + "user_ty": null + } + } + } + ] }, - "id": 3, - "name": ">::call_once" + "name": "std::sys::backtrace::__rust_begin_short_backtrace::" } }, - "symbol_name": "_ZN4core3ops8function6FnOnce9call_once17h" + "symbol_name": "_ZN3std3sys9backtrace28__rust_begin_short_backtrace17h" }, { "details": null, @@ -1261,52 +1193,98 @@ "func": { "Constant": { "const_": { - "id": 6, "kind": "ZeroSized" }, - "span": 43, "user_ty": null } }, "target": 1, "unwind": "Continue" } - }, - "span": 43 + } } }, { "statements": [], "terminator": { - "kind": "Return", - "span": 43 + "kind": "Return" } } ], "locals": [ { - "mutability": "Mut", - "span": 43 + "mutability": "Mut" }, { - "mutability": "Not", - "span": 43 + "mutability": "Not" }, { - "mutability": "Not", - "span": 43 + "mutability": "Not" } ], - "span": 43, "spread_arg": 2, "var_debug_info": [] }, - "id": 3, "name": "<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once" } }, "symbol_name": "_ZN4core3ops8function6FnOnce40call_once$u7b$$u7b$vtable.shim$u7d$$u7d$17h" }, + { + "details": null, + "mono_item_kind": { + "MonoItemFn": { + "body": { + "arg_count": 2, + "blocks": [ + { + "statements": [], + "terminator": { + "kind": { + "Call": { + "args": [], + "destination": { + "local": 0, + "projection": [] + }, + "func": { + "Move": { + "local": 1, + "projection": [] + } + }, + "target": 1, + "unwind": "Continue" + } + } + } + }, + { + "statements": [], + "terminator": { + "kind": "Return" + } + } + ], + "locals": [ + { + "mutability": "Mut" + }, + { + "mutability": "Not" + }, + { + "mutability": "Not" + } + ], + "spread_arg": 2, + "var_debug_info": [] + }, + "name": ">::call_once" + } + }, + "symbol_name": "_ZN4core3ops8function6FnOnce9call_once17h" + }, { "details": null, "mono_item_kind": { @@ -1340,8 +1318,7 @@ ] } ] - }, - "span": 43 + } } ], "terminator": { @@ -1368,10 +1345,8 @@ "func": { "Constant": { "const_": { - "id": 7, "kind": "ZeroSized" }, - "span": 43, "user_ty": null } }, @@ -1380,8 +1355,7 @@ "Cleanup": 3 } } - }, - "span": 43 + } } }, { @@ -1396,15 +1370,13 @@ "target": 2, "unwind": "Continue" } - }, - "span": 43 + } } }, { "statements": [], "terminator": { - "kind": "Return", - "span": 43 + "kind": "Return" } }, { @@ -1419,222 +1391,77 @@ "target": 4, "unwind": "Terminate" } - }, - "span": 43 - } - }, - { - "statements": [], - "terminator": { - "kind": "Resume", - "span": 43 - } - } - ], - "locals": [ - { - "mutability": "Mut", - "span": 43 - }, - { - "mutability": "Not", - "span": 43 - }, - { - "mutability": "Not", - "span": 43 - }, - { - "mutability": "Not", - "span": 43 - } - ], - "span": 43, - "spread_arg": 2, - "var_debug_info": [] - }, - "id": 3, - "name": "<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once" - } - }, - "symbol_name": "_ZN4core3ops8function6FnOnce9call_once17h" - }, - { - "details": null, - "mono_item_kind": { - "MonoItemFn": { - "body": { - "arg_count": 4, - "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": { - "args": [ - { - "Move": { - "local": 6, - "projection": [] - } - }, - { - "Move": { - "local": 2, - "projection": [] - } - }, - { - "Move": { - "local": 3, - "projection": [] - } - }, - { - "Move": { - "local": 4, - "projection": [] - } - } - ], - "destination": { - "local": 5, - "projection": [] - }, - "func": { - "Constant": { - "const_": { - "id": 0, - "kind": "ZeroSized" - }, - "span": 0, - "user_ty": null - } - }, - "target": 1, - "unwind": "Continue" - } - }, - "span": 1 } }, + { + "statements": [], + "terminator": { + "kind": "Resume" + } + } + ], + "locals": [ + { + "mutability": "Mut" + }, + { + "mutability": "Not" + }, + { + "mutability": "Not" + }, + { + "mutability": "Not" + } + ], + "spread_arg": 2, + "var_debug_info": [] + }, + "name": "<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once" + } + }, + "symbol_name": "_ZN4core3ops8function6FnOnce9call_once17h" + }, + { + "details": null, + "mono_item_kind": { + "MonoItemFn": { + "body": { + "arg_count": 1, + "blocks": [ + { + "statements": [], + "terminator": { + "kind": "Return" + } + } + ], + "locals": [ + { + "mutability": "Mut" + }, + { + "mutability": "Not" + } + ], + "spread_arg": null, + "var_debug_info": [] + }, + "name": "std::ptr::drop_in_place::<{closure@std::rt::lang_start<()>::{closure#0}}>" + } + }, + "symbol_name": "_ZN4core3ptr85drop_in_place$LT$std..rt..lang_start$LT$$LP$$RP$$GT$..$u7b$$u7b$closure$u7d$$u7d$$GT$17h" + }, + { + "details": null, + "mono_item_kind": { + "MonoItemFn": { + "body": { + "arg_count": 1, + "blocks": [ { "statements": [ - { - "kind": { - "StorageDead": 6 - }, - "span": 5 - }, { "kind": { "Assign": [ @@ -1644,168 +1471,49 @@ }, { "Use": { - "Copy": { - "local": 5, - "projection": [ - { - "Downcast": 0 - }, - { - "Field": [ - 0, - 6 - ] + "Constant": { + "const_": { + "kind": { + "Allocated": { + "align": 1, + "bytes": [ + 0 + ], + "mutability": "Mut", + "provenance": { + "ptrs": [] + } + } } - ] + }, + "user_ty": null } } } ] - }, - "span": 6 - }, - { - "kind": { - "StorageDead": 8 - }, - "span": 7 - }, - { - "kind": { - "StorageDead": 5 - }, - "span": 7 + } } ], "terminator": { - "kind": "Return", - "span": 4 + "kind": "Return" } } ], "locals": [ { - "mutability": "Mut", - "span": 8 - }, - { - "mutability": "Not", - "span": 9 - }, - { - "mutability": "Not", - "span": 10 - }, - { - "mutability": "Not", - "span": 11 - }, - { - "mutability": "Not", - "span": 12 - }, - { - "mutability": "Mut", - "span": 1 - }, - { - "mutability": "Mut", - "span": 2 - }, - { - "mutability": "Not", - "span": 2 + "mutability": "Mut" }, { - "mutability": "Not", - "span": 3 + "mutability": "Not" } ], - "span": 13, "spread_arg": null, - "var_debug_info": [ - { - "argument_index": 1, - "composite": null, - "name": "main", - "source_info": { - "scope": 0, - "span": 9 - }, - "value": { - "Place": { - "local": 1, - "projection": [] - } - } - }, - { - "argument_index": 2, - "composite": null, - "name": "argc", - "source_info": { - "scope": 0, - "span": 10 - }, - "value": { - "Place": { - "local": 2, - "projection": [] - } - } - }, - { - "argument_index": 3, - "composite": null, - "name": "argv", - "source_info": { - "scope": 0, - "span": 11 - }, - "value": { - "Place": { - "local": 3, - "projection": [] - } - } - }, - { - "argument_index": 4, - "composite": null, - "name": "sigpipe", - "source_info": { - "scope": 0, - "span": 12 - }, - "value": { - "Place": { - "local": 4, - "projection": [] - } - } - }, - { - "argument_index": null, - "composite": null, - "name": "v", - "source_info": { - "scope": 1, - "span": 6 - }, - "value": { - "Place": { - "local": 0, - "projection": [] - } - } - } - ] + "var_debug_info": [] }, - "id": 0, - "name": "std::rt::lang_start::<()>" + "name": "<() as std::process::Termination>::report" } }, - "symbol_name": "_ZN3std2rt10lang_start17h" + "symbol_name": "_ZN54_$LT$$LP$$RP$$u20$as$u20$std..process..Termination$GT$6report17h" } ], "types": [ @@ -1847,54 +1555,6 @@ } } ], - [ - { - "EnumType": { - "discriminants": [ - 0, - 1 - ], - "fields": "elided", - "layout": { - "abi": { - "Scalar": { - "Initialized": { - "valid_range": { - "end": 18446744073709551615, - "start": 0 - }, - "value": { - "Int": { - "length": "I64", - "signed": true - } - } - } - } - }, - "abi_align": 8, - "fields": { - "Arbitrary": { - "offsets": [ - { - "num_bits": 0 - } - ] - } - }, - "size": { - "num_bits": 64 - }, - "variants": { - "Single": { - "index": 0 - } - } - }, - "name": "std::result::Result" - } - } - ], [ { "StructType": { @@ -2310,39 +1970,6 @@ } } ], - [ - { - "RefType": { - "layout": { - "abi": { - "Scalar": { - "Initialized": { - "valid_range": { - "end": 18446744073709551615, - "start": 1 - }, - "value": { - "Pointer": 0 - } - } - } - }, - "abi_align": 8, - "fields": "Primitive", - "size": { - "num_bits": 64 - }, - "variants": { - "Single": { - "index": 0 - } - } - }, - "mutability": "Not", - "pointee_type": "elided" - } - } - ], [ { "RefType": { diff --git a/tests/integration/programs/recursion-simple-match.smir.json.expected b/tests/integration/expected/nightly-2025-03-01/recursion-simple-match.smir.json.expected similarity index 79% rename from tests/integration/programs/recursion-simple-match.smir.json.expected rename to tests/integration/expected/nightly-2025-03-01/recursion-simple-match.smir.json.expected index 7e331550..2d2ab057 100644 --- a/tests/integration/programs/recursion-simple-match.smir.json.expected +++ b/tests/integration/expected/nightly-2025-03-01/recursion-simple-match.smir.json.expected @@ -94,413 +94,6 @@ ] ], "items": [ - { - "details": null, - "mono_item_kind": { - "MonoItemFn": { - "body": { - "arg_count": 0, - "blocks": [ - { - "statements": [], - "terminator": { - "kind": { - "Call": { - "args": [ - { - "Constant": { - "const_": { - "id": 12, - "kind": { - "Allocated": { - "align": 4, - "bytes": [ - 10, - 0, - 0, - 0 - ], - "mutability": "Mut", - "provenance": { - "ptrs": [] - } - } - } - }, - "span": 63, - "user_ty": null - } - } - ], - "destination": { - "local": 1, - "projection": [] - }, - "func": { - "Constant": { - "const_": { - "id": 11, - "kind": "ZeroSized" - }, - "span": 62, - "user_ty": null - } - }, - "target": 1, - "unwind": "Continue" - } - }, - "span": 64 - } - }, - { - "statements": [], - "terminator": { - "kind": { - "SwitchInt": { - "discr": { - "Copy": { - "local": 1, - "projection": [] - } - }, - "targets": { - "branches": [ - [ - 55, - 2 - ] - ], - "otherwise": 3 - } - } - }, - "span": 65 - } - }, - { - "statements": [], - "terminator": { - "kind": "Return", - "span": 66 - } - }, - { - "statements": [], - "terminator": { - "kind": { - "Call": { - "args": [ - { - "Constant": { - "const_": { - "id": 14, - "kind": { - "Allocated": { - "align": 8, - "bytes": [ - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 27, - 0, - 0, - 0, - 0, - 0, - 0, - 0 - ], - "mutability": "Mut", - "provenance": { - "ptrs": [ - [ - 0, - 0 - ] - ] - } - } - } - }, - "span": 32, - "user_ty": null - } - } - ], - "destination": { - "local": 2, - "projection": [] - }, - "func": { - "Constant": { - "const_": { - "id": 13, - "kind": "ZeroSized" - }, - "span": 67, - "user_ty": null - } - }, - "target": null, - "unwind": "Continue" - } - }, - "span": 67 - } - } - ], - "locals": [ - { - "mutability": "Mut", - "span": 68 - }, - { - "mutability": "Not", - "span": 69 - }, - { - "mutability": "Mut", - "span": 67 - } - ], - "span": 70, - "spread_arg": null, - "var_debug_info": [ - { - "argument_index": null, - "composite": null, - "name": "ans", - "source_info": { - "scope": 1, - "span": 69 - }, - "value": { - "Place": { - "local": 1, - "projection": [] - } - } - } - ] - }, - "id": 7, - "name": "main" - } - }, - "symbol_name": "_ZN22recursion_simple_match4main17h" - }, - { - "details": null, - "mono_item_kind": { - "MonoItemFn": { - "body": { - "arg_count": 1, - "blocks": [ - { - "statements": [], - "terminator": { - "kind": "Return", - "span": 44 - } - } - ], - "locals": [ - { - "mutability": "Mut", - "span": 44 - }, - { - "mutability": "Not", - "span": 44 - } - ], - "span": 44, - "spread_arg": null, - "var_debug_info": [] - }, - "id": 4, - "name": "std::ptr::drop_in_place::<{closure@std::rt::lang_start<()>::{closure#0}}>" - } - }, - "symbol_name": "_ZN4core3ptr85drop_in_place$LT$std..rt..lang_start$LT$$LP$$RP$$GT$..$u7b$$u7b$closure$u7d$$u7d$$GT$17h" - }, - { - "details": null, - "mono_item_kind": { - "MonoItemFn": { - "body": { - "arg_count": 1, - "blocks": [ - { - "statements": [], - "terminator": { - "kind": { - "Call": { - "args": [ - { - "Move": { - "local": 1, - "projection": [] - } - }, - { - "Constant": { - "const_": { - "id": 4, - "kind": "ZeroSized" - }, - "span": 32, - "user_ty": null - } - } - ], - "destination": { - "local": 0, - "projection": [] - }, - "func": { - "Constant": { - "const_": { - "id": 3, - "kind": "ZeroSized" - }, - "span": 31, - "user_ty": null - } - }, - "target": 1, - "unwind": "Continue" - } - }, - "span": 33 - } - }, - { - "statements": [], - "terminator": { - "kind": { - "Call": { - "args": [ - { - "Constant": { - "const_": { - "id": 4, - "kind": "ZeroSized" - }, - "span": 32, - "user_ty": null - } - } - ], - "destination": { - "local": 2, - "projection": [] - }, - "func": { - "Constant": { - "const_": { - "id": 5, - "kind": "ZeroSized" - }, - "span": 34, - "user_ty": null - } - }, - "target": 2, - "unwind": "Unreachable" - } - }, - "span": 35 - } - }, - { - "statements": [], - "terminator": { - "kind": "Return", - "span": 36 - } - } - ], - "locals": [ - { - "mutability": "Mut", - "span": 37 - }, - { - "mutability": "Not", - "span": 38 - }, - { - "mutability": "Not", - "span": 39 - } - ], - "span": 42, - "spread_arg": null, - "var_debug_info": [ - { - "argument_index": 1, - "composite": null, - "name": "f", - "source_info": { - "scope": 0, - "span": 38 - }, - "value": { - "Place": { - "local": 1, - "projection": [] - } - } - }, - { - "argument_index": null, - "composite": null, - "name": "result", - "source_info": { - "scope": 1, - "span": 40 - }, - "value": { - "Place": { - "local": 0, - "projection": [] - } - } - }, - { - "argument_index": 1, - "composite": null, - "name": "dummy", - "source_info": { - "scope": 2, - "span": 41 - }, - "value": { - "Const": { - "const_": { - "id": 4, - "kind": "ZeroSized" - }, - "span": 32, - "user_ty": null - } - } - } - ] - }, - "id": 2, - "name": "std::sys::backtrace::__rust_begin_short_backtrace::" - } - }, - "symbol_name": "_ZN3std3sys9backtrace28__rust_begin_short_backtrace17h" - }, { "details": null, "mono_item_kind": { @@ -529,8 +122,7 @@ "otherwise": 1 } } - }, - "span": 50 + } } }, { @@ -554,7 +146,6 @@ { "Constant": { "const_": { - "id": 9, "kind": { "Allocated": { "align": 4, @@ -571,15 +162,13 @@ } } }, - "span": 51, "user_ty": null } } ] } ] - }, - "span": 52 + } } ], "terminator": { @@ -592,7 +181,7 @@ { "Field": [ 1, - 25 + 0 ] } ] @@ -611,7 +200,6 @@ { "Constant": { "const_": { - "id": 9, "kind": { "Allocated": { "align": 4, @@ -628,7 +216,6 @@ } } }, - "span": 51, "user_ty": null } } @@ -637,8 +224,7 @@ "target": 3, "unwind": "Continue" } - }, - "span": 52 + } } }, { @@ -654,7 +240,6 @@ "Use": { "Constant": { "const_": { - "id": 10, "kind": { "Allocated": { "align": 4, @@ -671,14 +256,12 @@ } } }, - "span": 53, "user_ty": null } } } ] - }, - "span": 53 + } } ], "terminator": { @@ -686,8 +269,7 @@ "Goto": { "target": 6 } - }, - "span": 53 + } } }, { @@ -707,7 +289,7 @@ { "Field": [ 0, - 26 + 0 ] } ] @@ -715,8 +297,7 @@ } } ] - }, - "span": 52 + } } ], "terminator": { @@ -737,18 +318,15 @@ "func": { "Constant": { "const_": { - "id": 11, "kind": "ZeroSized" }, - "span": 54, "user_ty": null } }, "target": 4, "unwind": "Continue" } - }, - "span": 55 + } } }, { @@ -778,8 +356,7 @@ ] } ] - }, - "span": 56 + } } ], "terminator": { @@ -792,7 +369,7 @@ { "Field": [ 1, - 25 + 0 ] } ] @@ -819,8 +396,7 @@ "target": 5, "unwind": "Continue" } - }, - "span": 56 + } } }, { @@ -840,7 +416,7 @@ { "Field": [ 0, - 26 + 0 ] } ] @@ -848,63 +424,235 @@ } } ] - }, - "span": 56 + } } ], "terminator": { "kind": { - "Goto": { - "target": 6 + "Goto": { + "target": 6 + } + } + } + }, + { + "statements": [], + "terminator": { + "kind": "Return" + } + } + ], + "locals": [ + { + "mutability": "Mut" + }, + { + "mutability": "Not" + }, + { + "mutability": "Mut" + }, + { + "mutability": "Mut" + }, + { + "mutability": "Mut" + }, + { + "mutability": "Mut" + } + ], + "spread_arg": null, + "var_debug_info": [ + { + "argument_index": 1, + "composite": null, + "name": "n", + "source_info": { + "scope": 0 + }, + "value": { + "Place": { + "local": 1, + "projection": [] + } + } + } + ] + }, + "name": "sum_to_n_rec" + } + }, + "symbol_name": "_ZN22recursion_simple_match12sum_to_n_rec17h" + }, + { + "details": null, + "mono_item_kind": { + "MonoItemFn": { + "body": { + "arg_count": 0, + "blocks": [ + { + "statements": [], + "terminator": { + "kind": { + "Call": { + "args": [ + { + "Constant": { + "const_": { + "kind": { + "Allocated": { + "align": 4, + "bytes": [ + 10, + 0, + 0, + 0 + ], + "mutability": "Mut", + "provenance": { + "ptrs": [] + } + } + } + }, + "user_ty": null + } + } + ], + "destination": { + "local": 1, + "projection": [] + }, + "func": { + "Constant": { + "const_": { + "kind": "ZeroSized" + }, + "user_ty": null + } + }, + "target": 1, + "unwind": "Continue" + } + } + } + }, + { + "statements": [], + "terminator": { + "kind": { + "SwitchInt": { + "discr": { + "Copy": { + "local": 1, + "projection": [] + } + }, + "targets": { + "branches": [ + [ + 55, + 2 + ] + ], + "otherwise": 3 + } } - }, - "span": 57 + } + } + }, + { + "statements": [], + "terminator": { + "kind": "Return" } }, { "statements": [], "terminator": { - "kind": "Return", - "span": 58 + "kind": { + "Call": { + "args": [ + { + "Constant": { + "const_": { + "kind": { + "Allocated": { + "align": 8, + "bytes": [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 27, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "mutability": "Mut", + "provenance": { + "ptrs": [ + [ + 0, + 0 + ] + ] + } + } + } + }, + "user_ty": null + } + } + ], + "destination": { + "local": 2, + "projection": [] + }, + "func": { + "Constant": { + "const_": { + "kind": "ZeroSized" + }, + "user_ty": null + } + }, + "target": null, + "unwind": "Continue" + } + } } } ], "locals": [ { - "mutability": "Mut", - "span": 59 - }, - { - "mutability": "Not", - "span": 60 - }, - { - "mutability": "Mut", - "span": 55 + "mutability": "Mut" }, { - "mutability": "Mut", - "span": 52 + "mutability": "Not" }, { - "mutability": "Mut", - "span": 52 - }, - { - "mutability": "Mut", - "span": 56 + "mutability": "Mut" } ], - "span": 61, "spread_arg": null, "var_debug_info": [ { - "argument_index": 1, + "argument_index": null, "composite": null, - "name": "n", + "name": "ans", "source_info": { - "scope": 0, - "span": 60 + "scope": 1 }, "value": { "Place": { @@ -915,101 +663,273 @@ } ] }, - "id": 6, - "name": "sum_to_n_rec" + "name": "main" } }, - "symbol_name": "_ZN22recursion_simple_match12sum_to_n_rec17h" + "symbol_name": "_ZN22recursion_simple_match4main17h" }, { "details": null, "mono_item_kind": { "MonoItemFn": { "body": { - "arg_count": 1, + "arg_count": 4, "blocks": [ { "statements": [ + { + "kind": { + "StorageLive": 5 + } + }, + { + "kind": { + "StorageLive": 7 + } + }, { "kind": { "Assign": [ { - "local": 0, + "local": 7, "projection": [] }, { - "Use": { - "Constant": { - "const_": { - "id": 8, - "kind": { - "Allocated": { - "align": 1, - "bytes": [ - 0 - ], - "mutability": "Mut", - "provenance": { - "ptrs": [] - } + "Aggregate": [ + { + "Closure": [ + 0, + [ + { + "Type": 0 + }, + { + "Type": 0 + }, + { + "Type": 0 + }, + { + "Type": 0 } + ] + ] + }, + [ + { + "Copy": { + "local": 1, + "projection": [] } - }, - "span": 46, - "user_ty": null + } + ] + ] + } + ] + } + }, + { + "kind": { + "Assign": [ + { + "local": 6, + "projection": [] + }, + { + "Ref": [ + { + "kind": "ReErased" + }, + "Shared", + { + "local": 7, + "projection": [] } - } + ] } ] - }, - "span": 46 + } + }, + { + "kind": { + "Assign": [ + { + "local": 5, + "projection": [] + }, + { + "Cast": [ + { + "PointerCoercion": "Unsize" + }, + { + "Copy": { + "local": 6, + "projection": [] + } + }, + 0 + ] + } + ] + } + } + ], + "terminator": { + "kind": { + "Call": { + "args": [ + { + "Move": { + "local": 5, + "projection": [] + } + }, + { + "Move": { + "local": 2, + "projection": [] + } + }, + { + "Move": { + "local": 3, + "projection": [] + } + }, + { + "Move": { + "local": 4, + "projection": [] + } + } + ], + "destination": { + "local": 0, + "projection": [] + }, + "func": { + "Constant": { + "const_": { + "kind": "ZeroSized" + }, + "user_ty": null + } + }, + "target": 1, + "unwind": "Continue" + } + } + } + }, + { + "statements": [ + { + "kind": { + "StorageDead": 5 + } + }, + { + "kind": { + "StorageDead": 7 + } } ], "terminator": { - "kind": "Return", - "span": 45 + "kind": "Return" } } ], "locals": [ { - "mutability": "Mut", - "span": 47 + "mutability": "Mut" + }, + { + "mutability": "Not" + }, + { + "mutability": "Not" }, { - "mutability": "Not", - "span": 48 + "mutability": "Not" + }, + { + "mutability": "Not" + }, + { + "mutability": "Mut" + }, + { + "mutability": "Not" + }, + { + "mutability": "Not" } ], - "span": 49, "spread_arg": null, "var_debug_info": [ { "argument_index": 1, "composite": null, - "name": "self", + "name": "main", "source_info": { - "scope": 0, - "span": 48 + "scope": 0 }, "value": { - "Const": { - "const_": { - "id": 4, - "kind": "ZeroSized" - }, - "span": 32, - "user_ty": null + "Place": { + "local": 1, + "projection": [] + } + } + }, + { + "argument_index": 2, + "composite": null, + "name": "argc", + "source_info": { + "scope": 0 + }, + "value": { + "Place": { + "local": 2, + "projection": [] + } + } + }, + { + "argument_index": 3, + "composite": null, + "name": "argv", + "source_info": { + "scope": 0 + }, + "value": { + "Place": { + "local": 3, + "projection": [] + } + } + }, + { + "argument_index": 4, + "composite": null, + "name": "sigpipe", + "source_info": { + "scope": 0 + }, + "value": { + "Place": { + "local": 4, + "projection": [] } } } ] }, - "id": 5, - "name": "<() as std::process::Termination>::report" + "name": "std::rt::lang_start::<()>" } }, - "symbol_name": "_ZN54_$LT$$LP$$RP$$u20$as$u20$std..process..Termination$GT$6report17h" + "symbol_name": "_ZN3std2rt10lang_start17h" }, { "details": null, @@ -1023,20 +943,17 @@ { "kind": { "StorageLive": 2 - }, - "span": 16 + } }, { "kind": { "StorageLive": 3 - }, - "span": 15 + } }, { "kind": { "StorageLive": 4 - }, - "span": 17 + } }, { "kind": { @@ -1054,7 +971,7 @@ { "Field": [ 0, - 7 + 0 ] } ] @@ -1062,8 +979,7 @@ } } ] - }, - "span": 17 + } } ], "terminator": { @@ -1084,18 +1000,15 @@ "func": { "Constant": { "const_": { - "id": 1, "kind": "ZeroSized" }, - "span": 14, "user_ty": null } }, "target": 1, "unwind": "Continue" } - }, - "span": 15 + } } }, { @@ -1103,8 +1016,7 @@ { "kind": { "StorageDead": 4 - }, - "span": 19 + } } ], "terminator": { @@ -1125,18 +1037,15 @@ "func": { "Constant": { "const_": { - "id": 2, "kind": "ZeroSized" }, - "span": 18, "user_ty": null } }, "target": 2, "unwind": "Continue" } - }, - "span": 16 + } } }, { @@ -1144,14 +1053,12 @@ { "kind": { "StorageDead": 3 - }, - "span": 21 + } }, { "kind": { "StorageLive": 5 - }, - "span": 22 + } }, { "kind": { @@ -1160,42 +1067,6 @@ "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": { @@ -1204,13 +1075,13 @@ { "Field": [ 0, - 15 + 0 ] }, { "Field": [ 0, - 9 + 0 ] } ] @@ -1218,8 +1089,7 @@ } } ] - }, - "span": 23 + } }, { "kind": { @@ -1233,73 +1103,52 @@ "IntToInt", { "Move": { - "local": 6, + "local": 5, "projection": [] } }, - 16 + 0 ] } ] - }, - "span": 24 - }, - { - "kind": { - "StorageDead": 6 - }, - "span": 25 + } }, { "kind": { "StorageDead": 5 - }, - "span": 26 + } }, { "kind": { "StorageDead": 2 - }, - "span": 27 + } } ], "terminator": { - "kind": "Return", - "span": 20 + "kind": "Return" } } ], "locals": [ { - "mutability": "Mut", - "span": 28 - }, - { - "mutability": "Mut", - "span": 3 + "mutability": "Mut" }, { - "mutability": "Mut", - "span": 16 + "mutability": "Mut" }, { - "mutability": "Mut", - "span": 15 + "mutability": "Mut" }, { - "mutability": "Mut", - "span": 17 + "mutability": "Mut" }, { - "mutability": "Mut", - "span": 22 + "mutability": "Mut" }, { - "mutability": "Mut", - "span": 23 + "mutability": "Mut" } ], - "span": 3, "spread_arg": null, "var_debug_info": [ { @@ -1307,8 +1156,7 @@ "composite": null, "name": "main", "source_info": { - "scope": 0, - "span": 9 + "scope": 0 }, "value": { "Place": { @@ -1318,7 +1166,7 @@ { "Field": [ 0, - 7 + 0 ] } ] @@ -1330,12 +1178,145 @@ "composite": null, "name": "self", "source_info": { - "scope": 1, - "span": 29 + "scope": 1 + }, + "value": { + "Place": { + "local": 2, + "projection": [] + } + } + } + ] + }, + "name": "std::rt::lang_start::<()>::{closure#0}" + } + }, + "symbol_name": "_ZN3std2rt10lang_start28_$u7b$$u7b$closure$u7d$$u7d$17h" + }, + { + "details": null, + "mono_item_kind": { + "MonoItemFn": { + "body": { + "arg_count": 1, + "blocks": [ + { + "statements": [], + "terminator": { + "kind": { + "Call": { + "args": [ + { + "Move": { + "local": 1, + "projection": [] + } + }, + { + "Constant": { + "const_": { + "kind": "ZeroSized" + }, + "user_ty": null + } + } + ], + "destination": { + "local": 0, + "projection": [] + }, + "func": { + "Constant": { + "const_": { + "kind": "ZeroSized" + }, + "user_ty": null + } + }, + "target": 1, + "unwind": "Continue" + } + } + } + }, + { + "statements": [], + "terminator": { + "kind": { + "Call": { + "args": [ + { + "Constant": { + "const_": { + "kind": "ZeroSized" + }, + "user_ty": null + } + } + ], + "destination": { + "local": 2, + "projection": [] + }, + "func": { + "Constant": { + "const_": { + "kind": "ZeroSized" + }, + "user_ty": null + } + }, + "target": 2, + "unwind": "Unreachable" + } + } + } + }, + { + "statements": [], + "terminator": { + "kind": "Return" + } + } + ], + "locals": [ + { + "mutability": "Mut" + }, + { + "mutability": "Not" + }, + { + "mutability": "Not" + } + ], + "spread_arg": null, + "var_debug_info": [ + { + "argument_index": 1, + "composite": null, + "name": "f", + "source_info": { + "scope": 0 + }, + "value": { + "Place": { + "local": 1, + "projection": [] + } + } + }, + { + "argument_index": null, + "composite": null, + "name": "result", + "source_info": { + "scope": 1 }, "value": { "Place": { - "local": 2, + "local": 0, "projection": [] } } @@ -1343,25 +1324,25 @@ { "argument_index": 1, "composite": null, - "name": "self", + "name": "dummy", "source_info": { - "scope": 2, - "span": 30 + "scope": 2 }, "value": { - "Place": { - "local": 5, - "projection": [] + "Const": { + "const_": { + "kind": "ZeroSized" + }, + "user_ty": null } } } ] }, - "id": 1, - "name": "std::rt::lang_start::<()>::{closure#0}" + "name": "std::sys::backtrace::__rust_begin_short_backtrace::" } }, - "symbol_name": "_ZN3std2rt10lang_start28_$u7b$$u7b$closure$u7d$$u7d$17h" + "symbol_name": "_ZN3std3sys9backtrace28__rust_begin_short_backtrace17h" }, { "details": null, @@ -1375,55 +1356,65 @@ "terminator": { "kind": { "Call": { - "args": [], + "args": [ + { + "Move": { + "local": 1, + "projection": [ + "Deref" + ] + } + }, + { + "Move": { + "local": 2, + "projection": [] + } + } + ], "destination": { "local": 0, "projection": [] }, "func": { - "Move": { - "local": 1, - "projection": [] + "Constant": { + "const_": { + "kind": "ZeroSized" + }, + "user_ty": null } }, "target": 1, "unwind": "Continue" } - }, - "span": 43 + } } }, { "statements": [], "terminator": { - "kind": "Return", - "span": 43 + "kind": "Return" } } ], "locals": [ { - "mutability": "Mut", - "span": 43 + "mutability": "Mut" }, { - "mutability": "Not", - "span": 43 + "mutability": "Not" }, { - "mutability": "Not", - "span": 43 + "mutability": "Not" } ], - "span": 43, "spread_arg": 2, "var_debug_info": [] }, - "id": 3, - "name": ">::call_once" + "name": "<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once" } }, - "symbol_name": "_ZN4core3ops8function6FnOnce9call_once17h" + "symbol_name": "_ZN4core3ops8function6FnOnce40call_once$u7b$$u7b$vtable.shim$u7d$$u7d$17h" }, { "details": null, @@ -1437,74 +1428,48 @@ "terminator": { "kind": { "Call": { - "args": [ - { - "Move": { - "local": 1, - "projection": [ - "Deref" - ] - } - }, - { - "Move": { - "local": 2, - "projection": [] - } - } - ], + "args": [], "destination": { "local": 0, "projection": [] }, "func": { - "Constant": { - "const_": { - "id": 6, - "kind": "ZeroSized" - }, - "span": 43, - "user_ty": null + "Move": { + "local": 1, + "projection": [] } }, "target": 1, "unwind": "Continue" } - }, - "span": 43 + } } }, { "statements": [], "terminator": { - "kind": "Return", - "span": 43 + "kind": "Return" } } ], "locals": [ { - "mutability": "Mut", - "span": 43 + "mutability": "Mut" }, { - "mutability": "Not", - "span": 43 + "mutability": "Not" }, { - "mutability": "Not", - "span": 43 + "mutability": "Not" } ], - "span": 43, "spread_arg": 2, "var_debug_info": [] }, - "id": 3, - "name": "<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once" + "name": ">::call_once" } }, - "symbol_name": "_ZN4core3ops8function6FnOnce40call_once$u7b$$u7b$vtable.shim$u7d$$u7d$17h" + "symbol_name": "_ZN4core3ops8function6FnOnce9call_once17h" }, { "details": null, @@ -1539,8 +1504,7 @@ ] } ] - }, - "span": 43 + } } ], "terminator": { @@ -1567,10 +1531,8 @@ "func": { "Constant": { "const_": { - "id": 7, "kind": "ZeroSized" }, - "span": 43, "user_ty": null } }, @@ -1579,8 +1541,7 @@ "Cleanup": 3 } } - }, - "span": 43 + } } }, { @@ -1595,15 +1556,13 @@ "target": 2, "unwind": "Continue" } - }, - "span": 43 + } } }, { "statements": [], "terminator": { - "kind": "Return", - "span": 43 + "kind": "Return" } }, { @@ -1618,222 +1577,77 @@ "target": 4, "unwind": "Terminate" } - }, - "span": 43 - } - }, - { - "statements": [], - "terminator": { - "kind": "Resume", - "span": 43 - } - } - ], - "locals": [ - { - "mutability": "Mut", - "span": 43 - }, - { - "mutability": "Not", - "span": 43 - }, - { - "mutability": "Not", - "span": 43 - }, - { - "mutability": "Not", - "span": 43 - } - ], - "span": 43, - "spread_arg": 2, - "var_debug_info": [] - }, - "id": 3, - "name": "<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once" - } - }, - "symbol_name": "_ZN4core3ops8function6FnOnce9call_once17h" - }, - { - "details": null, - "mono_item_kind": { - "MonoItemFn": { - "body": { - "arg_count": 4, - "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": { - "args": [ - { - "Move": { - "local": 6, - "projection": [] - } - }, - { - "Move": { - "local": 2, - "projection": [] - } - }, - { - "Move": { - "local": 3, - "projection": [] - } - }, - { - "Move": { - "local": 4, - "projection": [] - } - } - ], - "destination": { - "local": 5, - "projection": [] - }, - "func": { - "Constant": { - "const_": { - "id": 0, - "kind": "ZeroSized" - }, - "span": 0, - "user_ty": null - } - }, - "target": 1, - "unwind": "Continue" - } - }, - "span": 1 } }, + { + "statements": [], + "terminator": { + "kind": "Resume" + } + } + ], + "locals": [ + { + "mutability": "Mut" + }, + { + "mutability": "Not" + }, + { + "mutability": "Not" + }, + { + "mutability": "Not" + } + ], + "spread_arg": 2, + "var_debug_info": [] + }, + "name": "<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once" + } + }, + "symbol_name": "_ZN4core3ops8function6FnOnce9call_once17h" + }, + { + "details": null, + "mono_item_kind": { + "MonoItemFn": { + "body": { + "arg_count": 1, + "blocks": [ + { + "statements": [], + "terminator": { + "kind": "Return" + } + } + ], + "locals": [ + { + "mutability": "Mut" + }, + { + "mutability": "Not" + } + ], + "spread_arg": null, + "var_debug_info": [] + }, + "name": "std::ptr::drop_in_place::<{closure@std::rt::lang_start<()>::{closure#0}}>" + } + }, + "symbol_name": "_ZN4core3ptr85drop_in_place$LT$std..rt..lang_start$LT$$LP$$RP$$GT$..$u7b$$u7b$closure$u7d$$u7d$$GT$17h" + }, + { + "details": null, + "mono_item_kind": { + "MonoItemFn": { + "body": { + "arg_count": 1, + "blocks": [ { "statements": [ - { - "kind": { - "StorageDead": 6 - }, - "span": 5 - }, { "kind": { "Assign": [ @@ -1843,168 +1657,49 @@ }, { "Use": { - "Copy": { - "local": 5, - "projection": [ - { - "Downcast": 0 - }, - { - "Field": [ - 0, - 6 - ] + "Constant": { + "const_": { + "kind": { + "Allocated": { + "align": 1, + "bytes": [ + 0 + ], + "mutability": "Mut", + "provenance": { + "ptrs": [] + } + } } - ] + }, + "user_ty": null } } } ] - }, - "span": 6 - }, - { - "kind": { - "StorageDead": 8 - }, - "span": 7 - }, - { - "kind": { - "StorageDead": 5 - }, - "span": 7 + } } ], "terminator": { - "kind": "Return", - "span": 4 + "kind": "Return" } } ], "locals": [ { - "mutability": "Mut", - "span": 8 - }, - { - "mutability": "Not", - "span": 9 - }, - { - "mutability": "Not", - "span": 10 - }, - { - "mutability": "Not", - "span": 11 - }, - { - "mutability": "Not", - "span": 12 - }, - { - "mutability": "Mut", - "span": 1 - }, - { - "mutability": "Mut", - "span": 2 - }, - { - "mutability": "Not", - "span": 2 + "mutability": "Mut" }, { - "mutability": "Not", - "span": 3 + "mutability": "Not" } ], - "span": 13, "spread_arg": null, - "var_debug_info": [ - { - "argument_index": 1, - "composite": null, - "name": "main", - "source_info": { - "scope": 0, - "span": 9 - }, - "value": { - "Place": { - "local": 1, - "projection": [] - } - } - }, - { - "argument_index": 2, - "composite": null, - "name": "argc", - "source_info": { - "scope": 0, - "span": 10 - }, - "value": { - "Place": { - "local": 2, - "projection": [] - } - } - }, - { - "argument_index": 3, - "composite": null, - "name": "argv", - "source_info": { - "scope": 0, - "span": 11 - }, - "value": { - "Place": { - "local": 3, - "projection": [] - } - } - }, - { - "argument_index": 4, - "composite": null, - "name": "sigpipe", - "source_info": { - "scope": 0, - "span": 12 - }, - "value": { - "Place": { - "local": 4, - "projection": [] - } - } - }, - { - "argument_index": null, - "composite": null, - "name": "v", - "source_info": { - "scope": 1, - "span": 6 - }, - "value": { - "Place": { - "local": 0, - "projection": [] - } - } - } - ] + "var_debug_info": [] }, - "id": 0, - "name": "std::rt::lang_start::<()>" + "name": "<() as std::process::Termination>::report" } }, - "symbol_name": "_ZN3std2rt10lang_start17h" + "symbol_name": "_ZN54_$LT$$LP$$RP$$u20$as$u20$std..process..Termination$GT$6report17h" } ], "types": [ @@ -2046,54 +1741,6 @@ } } ], - [ - { - "EnumType": { - "discriminants": [ - 0, - 1 - ], - "fields": "elided", - "layout": { - "abi": { - "Scalar": { - "Initialized": { - "valid_range": { - "end": 18446744073709551615, - "start": 0 - }, - "value": { - "Int": { - "length": "I64", - "signed": true - } - } - } - } - }, - "abi_align": 8, - "fields": { - "Arbitrary": { - "offsets": [ - { - "num_bits": 0 - } - ] - } - }, - "size": { - "num_bits": 64 - }, - "variants": { - "Single": { - "index": 0 - } - } - }, - "name": "std::result::Result" - } - } - ], [ { "StructType": { @@ -2509,39 +2156,6 @@ } } ], - [ - { - "RefType": { - "layout": { - "abi": { - "Scalar": { - "Initialized": { - "valid_range": { - "end": 18446744073709551615, - "start": 1 - }, - "value": { - "Pointer": 0 - } - } - } - }, - "abi_align": 8, - "fields": "Primitive", - "size": { - "num_bits": 64 - }, - "variants": { - "Single": { - "index": 0 - } - } - }, - "mutability": "Not", - "pointee_type": "elided" - } - } - ], [ { "RefType": { diff --git a/tests/integration/programs/recursion-simple.smir.json.expected b/tests/integration/expected/nightly-2025-03-01/recursion-simple.smir.json.expected similarity index 79% rename from tests/integration/programs/recursion-simple.smir.json.expected rename to tests/integration/expected/nightly-2025-03-01/recursion-simple.smir.json.expected index b39ff5a7..a2781bcf 100644 --- a/tests/integration/programs/recursion-simple.smir.json.expected +++ b/tests/integration/expected/nightly-2025-03-01/recursion-simple.smir.json.expected @@ -94,413 +94,6 @@ ] ], "items": [ - { - "details": null, - "mono_item_kind": { - "MonoItemFn": { - "body": { - "arg_count": 0, - "blocks": [ - { - "statements": [], - "terminator": { - "kind": { - "Call": { - "args": [ - { - "Constant": { - "const_": { - "id": 12, - "kind": { - "Allocated": { - "align": 4, - "bytes": [ - 10, - 0, - 0, - 0 - ], - "mutability": "Mut", - "provenance": { - "ptrs": [] - } - } - } - }, - "span": 63, - "user_ty": null - } - } - ], - "destination": { - "local": 1, - "projection": [] - }, - "func": { - "Constant": { - "const_": { - "id": 11, - "kind": "ZeroSized" - }, - "span": 62, - "user_ty": null - } - }, - "target": 1, - "unwind": "Continue" - } - }, - "span": 64 - } - }, - { - "statements": [], - "terminator": { - "kind": { - "SwitchInt": { - "discr": { - "Copy": { - "local": 1, - "projection": [] - } - }, - "targets": { - "branches": [ - [ - 55, - 2 - ] - ], - "otherwise": 3 - } - } - }, - "span": 65 - } - }, - { - "statements": [], - "terminator": { - "kind": "Return", - "span": 66 - } - }, - { - "statements": [], - "terminator": { - "kind": { - "Call": { - "args": [ - { - "Constant": { - "const_": { - "id": 14, - "kind": { - "Allocated": { - "align": 8, - "bytes": [ - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 27, - 0, - 0, - 0, - 0, - 0, - 0, - 0 - ], - "mutability": "Mut", - "provenance": { - "ptrs": [ - [ - 0, - 0 - ] - ] - } - } - } - }, - "span": 32, - "user_ty": null - } - } - ], - "destination": { - "local": 2, - "projection": [] - }, - "func": { - "Constant": { - "const_": { - "id": 13, - "kind": "ZeroSized" - }, - "span": 67, - "user_ty": null - } - }, - "target": null, - "unwind": "Continue" - } - }, - "span": 67 - } - } - ], - "locals": [ - { - "mutability": "Mut", - "span": 68 - }, - { - "mutability": "Not", - "span": 69 - }, - { - "mutability": "Mut", - "span": 67 - } - ], - "span": 70, - "spread_arg": null, - "var_debug_info": [ - { - "argument_index": null, - "composite": null, - "name": "ans", - "source_info": { - "scope": 1, - "span": 69 - }, - "value": { - "Place": { - "local": 1, - "projection": [] - } - } - } - ] - }, - "id": 7, - "name": "main" - } - }, - "symbol_name": "_ZN16recursion_simple4main17h" - }, - { - "details": null, - "mono_item_kind": { - "MonoItemFn": { - "body": { - "arg_count": 1, - "blocks": [ - { - "statements": [], - "terminator": { - "kind": "Return", - "span": 44 - } - } - ], - "locals": [ - { - "mutability": "Mut", - "span": 44 - }, - { - "mutability": "Not", - "span": 44 - } - ], - "span": 44, - "spread_arg": null, - "var_debug_info": [] - }, - "id": 4, - "name": "std::ptr::drop_in_place::<{closure@std::rt::lang_start<()>::{closure#0}}>" - } - }, - "symbol_name": "_ZN4core3ptr85drop_in_place$LT$std..rt..lang_start$LT$$LP$$RP$$GT$..$u7b$$u7b$closure$u7d$$u7d$$GT$17h" - }, - { - "details": null, - "mono_item_kind": { - "MonoItemFn": { - "body": { - "arg_count": 1, - "blocks": [ - { - "statements": [], - "terminator": { - "kind": { - "Call": { - "args": [ - { - "Move": { - "local": 1, - "projection": [] - } - }, - { - "Constant": { - "const_": { - "id": 4, - "kind": "ZeroSized" - }, - "span": 32, - "user_ty": null - } - } - ], - "destination": { - "local": 0, - "projection": [] - }, - "func": { - "Constant": { - "const_": { - "id": 3, - "kind": "ZeroSized" - }, - "span": 31, - "user_ty": null - } - }, - "target": 1, - "unwind": "Continue" - } - }, - "span": 33 - } - }, - { - "statements": [], - "terminator": { - "kind": { - "Call": { - "args": [ - { - "Constant": { - "const_": { - "id": 4, - "kind": "ZeroSized" - }, - "span": 32, - "user_ty": null - } - } - ], - "destination": { - "local": 2, - "projection": [] - }, - "func": { - "Constant": { - "const_": { - "id": 5, - "kind": "ZeroSized" - }, - "span": 34, - "user_ty": null - } - }, - "target": 2, - "unwind": "Unreachable" - } - }, - "span": 35 - } - }, - { - "statements": [], - "terminator": { - "kind": "Return", - "span": 36 - } - } - ], - "locals": [ - { - "mutability": "Mut", - "span": 37 - }, - { - "mutability": "Not", - "span": 38 - }, - { - "mutability": "Not", - "span": 39 - } - ], - "span": 42, - "spread_arg": null, - "var_debug_info": [ - { - "argument_index": 1, - "composite": null, - "name": "f", - "source_info": { - "scope": 0, - "span": 38 - }, - "value": { - "Place": { - "local": 1, - "projection": [] - } - } - }, - { - "argument_index": null, - "composite": null, - "name": "result", - "source_info": { - "scope": 1, - "span": 40 - }, - "value": { - "Place": { - "local": 0, - "projection": [] - } - } - }, - { - "argument_index": 1, - "composite": null, - "name": "dummy", - "source_info": { - "scope": 2, - "span": 41 - }, - "value": { - "Const": { - "const_": { - "id": 4, - "kind": "ZeroSized" - }, - "span": 32, - "user_ty": null - } - } - } - ] - }, - "id": 2, - "name": "std::sys::backtrace::__rust_begin_short_backtrace::" - } - }, - "symbol_name": "_ZN3std3sys9backtrace28__rust_begin_short_backtrace17h" - }, { "details": null, "mono_item_kind": { @@ -529,8 +122,7 @@ "otherwise": 2 } } - }, - "span": 50 + } } }, { @@ -546,7 +138,6 @@ "Use": { "Constant": { "const_": { - "id": 9, "kind": { "Allocated": { "align": 4, @@ -563,14 +154,12 @@ } } }, - "span": 52, "user_ty": null } } } ] - }, - "span": 52 + } } ], "terminator": { @@ -578,8 +167,7 @@ "Goto": { "target": 6 } - }, - "span": 51 + } } }, { @@ -603,7 +191,6 @@ { "Constant": { "const_": { - "id": 10, "kind": { "Allocated": { "align": 4, @@ -620,15 +207,13 @@ } } }, - "span": 53, "user_ty": null } } ] } ] - }, - "span": 54 + } } ], "terminator": { @@ -641,7 +226,7 @@ { "Field": [ 1, - 26 + 0 ] } ] @@ -660,7 +245,6 @@ { "Constant": { "const_": { - "id": 10, "kind": { "Allocated": { "align": 4, @@ -677,7 +261,6 @@ } } }, - "span": 53, "user_ty": null } } @@ -686,8 +269,7 @@ "target": 3, "unwind": "Continue" } - }, - "span": 54 + } } }, { @@ -707,7 +289,7 @@ { "Field": [ 0, - 25 + 0 ] } ] @@ -715,8 +297,7 @@ } } ] - }, - "span": 54 + } } ], "terminator": { @@ -737,18 +318,15 @@ "func": { "Constant": { "const_": { - "id": 11, "kind": "ZeroSized" }, - "span": 55, "user_ty": null } }, "target": 4, "unwind": "Continue" } - }, - "span": 56 + } } }, { @@ -778,8 +356,7 @@ ] } ] - }, - "span": 57 + } } ], "terminator": { @@ -792,7 +369,7 @@ { "Field": [ 1, - 26 + 0 ] } ] @@ -819,8 +396,7 @@ "target": 5, "unwind": "Continue" } - }, - "span": 57 + } } }, { @@ -840,7 +416,7 @@ { "Field": [ 0, - 25 + 0 ] } ] @@ -848,63 +424,235 @@ } } ] - }, - "span": 57 + } } ], "terminator": { "kind": { - "Goto": { - "target": 6 + "Goto": { + "target": 6 + } + } + } + }, + { + "statements": [], + "terminator": { + "kind": "Return" + } + } + ], + "locals": [ + { + "mutability": "Mut" + }, + { + "mutability": "Not" + }, + { + "mutability": "Mut" + }, + { + "mutability": "Mut" + }, + { + "mutability": "Mut" + }, + { + "mutability": "Mut" + } + ], + "spread_arg": null, + "var_debug_info": [ + { + "argument_index": 1, + "composite": null, + "name": "n", + "source_info": { + "scope": 0 + }, + "value": { + "Place": { + "local": 1, + "projection": [] + } + } + } + ] + }, + "name": "sum_to_n_rec" + } + }, + "symbol_name": "_ZN16recursion_simple12sum_to_n_rec17h" + }, + { + "details": null, + "mono_item_kind": { + "MonoItemFn": { + "body": { + "arg_count": 0, + "blocks": [ + { + "statements": [], + "terminator": { + "kind": { + "Call": { + "args": [ + { + "Constant": { + "const_": { + "kind": { + "Allocated": { + "align": 4, + "bytes": [ + 10, + 0, + 0, + 0 + ], + "mutability": "Mut", + "provenance": { + "ptrs": [] + } + } + } + }, + "user_ty": null + } + } + ], + "destination": { + "local": 1, + "projection": [] + }, + "func": { + "Constant": { + "const_": { + "kind": "ZeroSized" + }, + "user_ty": null + } + }, + "target": 1, + "unwind": "Continue" + } + } + } + }, + { + "statements": [], + "terminator": { + "kind": { + "SwitchInt": { + "discr": { + "Copy": { + "local": 1, + "projection": [] + } + }, + "targets": { + "branches": [ + [ + 55, + 2 + ] + ], + "otherwise": 3 + } } - }, - "span": 51 + } + } + }, + { + "statements": [], + "terminator": { + "kind": "Return" } }, { "statements": [], "terminator": { - "kind": "Return", - "span": 58 + "kind": { + "Call": { + "args": [ + { + "Constant": { + "const_": { + "kind": { + "Allocated": { + "align": 8, + "bytes": [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 27, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "mutability": "Mut", + "provenance": { + "ptrs": [ + [ + 0, + 0 + ] + ] + } + } + } + }, + "user_ty": null + } + } + ], + "destination": { + "local": 2, + "projection": [] + }, + "func": { + "Constant": { + "const_": { + "kind": "ZeroSized" + }, + "user_ty": null + } + }, + "target": null, + "unwind": "Continue" + } + } } } ], "locals": [ { - "mutability": "Mut", - "span": 59 - }, - { - "mutability": "Not", - "span": 60 - }, - { - "mutability": "Mut", - "span": 56 + "mutability": "Mut" }, { - "mutability": "Mut", - "span": 54 + "mutability": "Not" }, { - "mutability": "Mut", - "span": 54 - }, - { - "mutability": "Mut", - "span": 57 + "mutability": "Mut" } ], - "span": 61, "spread_arg": null, "var_debug_info": [ { - "argument_index": 1, + "argument_index": null, "composite": null, - "name": "n", + "name": "ans", "source_info": { - "scope": 0, - "span": 60 + "scope": 1 }, "value": { "Place": { @@ -915,101 +663,273 @@ } ] }, - "id": 6, - "name": "sum_to_n_rec" + "name": "main" } }, - "symbol_name": "_ZN16recursion_simple12sum_to_n_rec17h" + "symbol_name": "_ZN16recursion_simple4main17h" }, { "details": null, "mono_item_kind": { "MonoItemFn": { "body": { - "arg_count": 1, + "arg_count": 4, "blocks": [ { "statements": [ + { + "kind": { + "StorageLive": 5 + } + }, + { + "kind": { + "StorageLive": 7 + } + }, { "kind": { "Assign": [ { - "local": 0, + "local": 7, "projection": [] }, { - "Use": { - "Constant": { - "const_": { - "id": 8, - "kind": { - "Allocated": { - "align": 1, - "bytes": [ - 0 - ], - "mutability": "Mut", - "provenance": { - "ptrs": [] - } + "Aggregate": [ + { + "Closure": [ + 0, + [ + { + "Type": 0 + }, + { + "Type": 0 + }, + { + "Type": 0 + }, + { + "Type": 0 } + ] + ] + }, + [ + { + "Copy": { + "local": 1, + "projection": [] } - }, - "span": 46, - "user_ty": null + } + ] + ] + } + ] + } + }, + { + "kind": { + "Assign": [ + { + "local": 6, + "projection": [] + }, + { + "Ref": [ + { + "kind": "ReErased" + }, + "Shared", + { + "local": 7, + "projection": [] } - } + ] } ] - }, - "span": 46 + } + }, + { + "kind": { + "Assign": [ + { + "local": 5, + "projection": [] + }, + { + "Cast": [ + { + "PointerCoercion": "Unsize" + }, + { + "Copy": { + "local": 6, + "projection": [] + } + }, + 0 + ] + } + ] + } + } + ], + "terminator": { + "kind": { + "Call": { + "args": [ + { + "Move": { + "local": 5, + "projection": [] + } + }, + { + "Move": { + "local": 2, + "projection": [] + } + }, + { + "Move": { + "local": 3, + "projection": [] + } + }, + { + "Move": { + "local": 4, + "projection": [] + } + } + ], + "destination": { + "local": 0, + "projection": [] + }, + "func": { + "Constant": { + "const_": { + "kind": "ZeroSized" + }, + "user_ty": null + } + }, + "target": 1, + "unwind": "Continue" + } + } + } + }, + { + "statements": [ + { + "kind": { + "StorageDead": 5 + } + }, + { + "kind": { + "StorageDead": 7 + } } ], "terminator": { - "kind": "Return", - "span": 45 + "kind": "Return" } } ], "locals": [ { - "mutability": "Mut", - "span": 47 + "mutability": "Mut" + }, + { + "mutability": "Not" + }, + { + "mutability": "Not" }, { - "mutability": "Not", - "span": 48 + "mutability": "Not" + }, + { + "mutability": "Not" + }, + { + "mutability": "Mut" + }, + { + "mutability": "Not" + }, + { + "mutability": "Not" } ], - "span": 49, "spread_arg": null, "var_debug_info": [ { "argument_index": 1, "composite": null, - "name": "self", + "name": "main", "source_info": { - "scope": 0, - "span": 48 + "scope": 0 }, "value": { - "Const": { - "const_": { - "id": 4, - "kind": "ZeroSized" - }, - "span": 32, - "user_ty": null + "Place": { + "local": 1, + "projection": [] + } + } + }, + { + "argument_index": 2, + "composite": null, + "name": "argc", + "source_info": { + "scope": 0 + }, + "value": { + "Place": { + "local": 2, + "projection": [] + } + } + }, + { + "argument_index": 3, + "composite": null, + "name": "argv", + "source_info": { + "scope": 0 + }, + "value": { + "Place": { + "local": 3, + "projection": [] + } + } + }, + { + "argument_index": 4, + "composite": null, + "name": "sigpipe", + "source_info": { + "scope": 0 + }, + "value": { + "Place": { + "local": 4, + "projection": [] } } } ] }, - "id": 5, - "name": "<() as std::process::Termination>::report" + "name": "std::rt::lang_start::<()>" } }, - "symbol_name": "_ZN54_$LT$$LP$$RP$$u20$as$u20$std..process..Termination$GT$6report17h" + "symbol_name": "_ZN3std2rt10lang_start17h" }, { "details": null, @@ -1023,20 +943,17 @@ { "kind": { "StorageLive": 2 - }, - "span": 16 + } }, { "kind": { "StorageLive": 3 - }, - "span": 15 + } }, { "kind": { "StorageLive": 4 - }, - "span": 17 + } }, { "kind": { @@ -1054,7 +971,7 @@ { "Field": [ 0, - 7 + 0 ] } ] @@ -1062,8 +979,7 @@ } } ] - }, - "span": 17 + } } ], "terminator": { @@ -1084,18 +1000,15 @@ "func": { "Constant": { "const_": { - "id": 1, "kind": "ZeroSized" }, - "span": 14, "user_ty": null } }, "target": 1, "unwind": "Continue" } - }, - "span": 15 + } } }, { @@ -1103,8 +1016,7 @@ { "kind": { "StorageDead": 4 - }, - "span": 19 + } } ], "terminator": { @@ -1125,18 +1037,15 @@ "func": { "Constant": { "const_": { - "id": 2, "kind": "ZeroSized" }, - "span": 18, "user_ty": null } }, "target": 2, "unwind": "Continue" } - }, - "span": 16 + } } }, { @@ -1144,14 +1053,12 @@ { "kind": { "StorageDead": 3 - }, - "span": 21 + } }, { "kind": { "StorageLive": 5 - }, - "span": 22 + } }, { "kind": { @@ -1160,42 +1067,6 @@ "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": { @@ -1204,13 +1075,13 @@ { "Field": [ 0, - 15 + 0 ] }, { "Field": [ 0, - 9 + 0 ] } ] @@ -1218,8 +1089,7 @@ } } ] - }, - "span": 23 + } }, { "kind": { @@ -1233,73 +1103,52 @@ "IntToInt", { "Move": { - "local": 6, + "local": 5, "projection": [] } }, - 16 + 0 ] } ] - }, - "span": 24 - }, - { - "kind": { - "StorageDead": 6 - }, - "span": 25 + } }, { "kind": { "StorageDead": 5 - }, - "span": 26 + } }, { "kind": { "StorageDead": 2 - }, - "span": 27 + } } ], "terminator": { - "kind": "Return", - "span": 20 + "kind": "Return" } } ], "locals": [ { - "mutability": "Mut", - "span": 28 - }, - { - "mutability": "Mut", - "span": 3 + "mutability": "Mut" }, { - "mutability": "Mut", - "span": 16 + "mutability": "Mut" }, { - "mutability": "Mut", - "span": 15 + "mutability": "Mut" }, { - "mutability": "Mut", - "span": 17 + "mutability": "Mut" }, { - "mutability": "Mut", - "span": 22 + "mutability": "Mut" }, { - "mutability": "Mut", - "span": 23 + "mutability": "Mut" } ], - "span": 3, "spread_arg": null, "var_debug_info": [ { @@ -1307,8 +1156,7 @@ "composite": null, "name": "main", "source_info": { - "scope": 0, - "span": 9 + "scope": 0 }, "value": { "Place": { @@ -1318,7 +1166,7 @@ { "Field": [ 0, - 7 + 0 ] } ] @@ -1330,12 +1178,145 @@ "composite": null, "name": "self", "source_info": { - "scope": 1, - "span": 29 + "scope": 1 + }, + "value": { + "Place": { + "local": 2, + "projection": [] + } + } + } + ] + }, + "name": "std::rt::lang_start::<()>::{closure#0}" + } + }, + "symbol_name": "_ZN3std2rt10lang_start28_$u7b$$u7b$closure$u7d$$u7d$17h" + }, + { + "details": null, + "mono_item_kind": { + "MonoItemFn": { + "body": { + "arg_count": 1, + "blocks": [ + { + "statements": [], + "terminator": { + "kind": { + "Call": { + "args": [ + { + "Move": { + "local": 1, + "projection": [] + } + }, + { + "Constant": { + "const_": { + "kind": "ZeroSized" + }, + "user_ty": null + } + } + ], + "destination": { + "local": 0, + "projection": [] + }, + "func": { + "Constant": { + "const_": { + "kind": "ZeroSized" + }, + "user_ty": null + } + }, + "target": 1, + "unwind": "Continue" + } + } + } + }, + { + "statements": [], + "terminator": { + "kind": { + "Call": { + "args": [ + { + "Constant": { + "const_": { + "kind": "ZeroSized" + }, + "user_ty": null + } + } + ], + "destination": { + "local": 2, + "projection": [] + }, + "func": { + "Constant": { + "const_": { + "kind": "ZeroSized" + }, + "user_ty": null + } + }, + "target": 2, + "unwind": "Unreachable" + } + } + } + }, + { + "statements": [], + "terminator": { + "kind": "Return" + } + } + ], + "locals": [ + { + "mutability": "Mut" + }, + { + "mutability": "Not" + }, + { + "mutability": "Not" + } + ], + "spread_arg": null, + "var_debug_info": [ + { + "argument_index": 1, + "composite": null, + "name": "f", + "source_info": { + "scope": 0 + }, + "value": { + "Place": { + "local": 1, + "projection": [] + } + } + }, + { + "argument_index": null, + "composite": null, + "name": "result", + "source_info": { + "scope": 1 }, "value": { "Place": { - "local": 2, + "local": 0, "projection": [] } } @@ -1343,25 +1324,25 @@ { "argument_index": 1, "composite": null, - "name": "self", + "name": "dummy", "source_info": { - "scope": 2, - "span": 30 + "scope": 2 }, "value": { - "Place": { - "local": 5, - "projection": [] + "Const": { + "const_": { + "kind": "ZeroSized" + }, + "user_ty": null } } } ] }, - "id": 1, - "name": "std::rt::lang_start::<()>::{closure#0}" + "name": "std::sys::backtrace::__rust_begin_short_backtrace::" } }, - "symbol_name": "_ZN3std2rt10lang_start28_$u7b$$u7b$closure$u7d$$u7d$17h" + "symbol_name": "_ZN3std3sys9backtrace28__rust_begin_short_backtrace17h" }, { "details": null, @@ -1375,55 +1356,65 @@ "terminator": { "kind": { "Call": { - "args": [], + "args": [ + { + "Move": { + "local": 1, + "projection": [ + "Deref" + ] + } + }, + { + "Move": { + "local": 2, + "projection": [] + } + } + ], "destination": { "local": 0, "projection": [] }, "func": { - "Move": { - "local": 1, - "projection": [] + "Constant": { + "const_": { + "kind": "ZeroSized" + }, + "user_ty": null } }, "target": 1, "unwind": "Continue" } - }, - "span": 43 + } } }, { "statements": [], "terminator": { - "kind": "Return", - "span": 43 + "kind": "Return" } } ], "locals": [ { - "mutability": "Mut", - "span": 43 + "mutability": "Mut" }, { - "mutability": "Not", - "span": 43 + "mutability": "Not" }, { - "mutability": "Not", - "span": 43 + "mutability": "Not" } ], - "span": 43, "spread_arg": 2, "var_debug_info": [] }, - "id": 3, - "name": ">::call_once" + "name": "<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once" } }, - "symbol_name": "_ZN4core3ops8function6FnOnce9call_once17h" + "symbol_name": "_ZN4core3ops8function6FnOnce40call_once$u7b$$u7b$vtable.shim$u7d$$u7d$17h" }, { "details": null, @@ -1437,74 +1428,48 @@ "terminator": { "kind": { "Call": { - "args": [ - { - "Move": { - "local": 1, - "projection": [ - "Deref" - ] - } - }, - { - "Move": { - "local": 2, - "projection": [] - } - } - ], + "args": [], "destination": { "local": 0, "projection": [] }, "func": { - "Constant": { - "const_": { - "id": 6, - "kind": "ZeroSized" - }, - "span": 43, - "user_ty": null + "Move": { + "local": 1, + "projection": [] } }, "target": 1, "unwind": "Continue" } - }, - "span": 43 + } } }, { "statements": [], "terminator": { - "kind": "Return", - "span": 43 + "kind": "Return" } } ], "locals": [ { - "mutability": "Mut", - "span": 43 + "mutability": "Mut" }, { - "mutability": "Not", - "span": 43 + "mutability": "Not" }, { - "mutability": "Not", - "span": 43 + "mutability": "Not" } ], - "span": 43, "spread_arg": 2, "var_debug_info": [] }, - "id": 3, - "name": "<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once" + "name": ">::call_once" } }, - "symbol_name": "_ZN4core3ops8function6FnOnce40call_once$u7b$$u7b$vtable.shim$u7d$$u7d$17h" + "symbol_name": "_ZN4core3ops8function6FnOnce9call_once17h" }, { "details": null, @@ -1539,8 +1504,7 @@ ] } ] - }, - "span": 43 + } } ], "terminator": { @@ -1567,10 +1531,8 @@ "func": { "Constant": { "const_": { - "id": 7, "kind": "ZeroSized" }, - "span": 43, "user_ty": null } }, @@ -1579,8 +1541,7 @@ "Cleanup": 3 } } - }, - "span": 43 + } } }, { @@ -1595,15 +1556,13 @@ "target": 2, "unwind": "Continue" } - }, - "span": 43 + } } }, { "statements": [], "terminator": { - "kind": "Return", - "span": 43 + "kind": "Return" } }, { @@ -1618,222 +1577,77 @@ "target": 4, "unwind": "Terminate" } - }, - "span": 43 - } - }, - { - "statements": [], - "terminator": { - "kind": "Resume", - "span": 43 - } - } - ], - "locals": [ - { - "mutability": "Mut", - "span": 43 - }, - { - "mutability": "Not", - "span": 43 - }, - { - "mutability": "Not", - "span": 43 - }, - { - "mutability": "Not", - "span": 43 - } - ], - "span": 43, - "spread_arg": 2, - "var_debug_info": [] - }, - "id": 3, - "name": "<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once" - } - }, - "symbol_name": "_ZN4core3ops8function6FnOnce9call_once17h" - }, - { - "details": null, - "mono_item_kind": { - "MonoItemFn": { - "body": { - "arg_count": 4, - "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": { - "args": [ - { - "Move": { - "local": 6, - "projection": [] - } - }, - { - "Move": { - "local": 2, - "projection": [] - } - }, - { - "Move": { - "local": 3, - "projection": [] - } - }, - { - "Move": { - "local": 4, - "projection": [] - } - } - ], - "destination": { - "local": 5, - "projection": [] - }, - "func": { - "Constant": { - "const_": { - "id": 0, - "kind": "ZeroSized" - }, - "span": 0, - "user_ty": null - } - }, - "target": 1, - "unwind": "Continue" - } - }, - "span": 1 } }, + { + "statements": [], + "terminator": { + "kind": "Resume" + } + } + ], + "locals": [ + { + "mutability": "Mut" + }, + { + "mutability": "Not" + }, + { + "mutability": "Not" + }, + { + "mutability": "Not" + } + ], + "spread_arg": 2, + "var_debug_info": [] + }, + "name": "<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once" + } + }, + "symbol_name": "_ZN4core3ops8function6FnOnce9call_once17h" + }, + { + "details": null, + "mono_item_kind": { + "MonoItemFn": { + "body": { + "arg_count": 1, + "blocks": [ + { + "statements": [], + "terminator": { + "kind": "Return" + } + } + ], + "locals": [ + { + "mutability": "Mut" + }, + { + "mutability": "Not" + } + ], + "spread_arg": null, + "var_debug_info": [] + }, + "name": "std::ptr::drop_in_place::<{closure@std::rt::lang_start<()>::{closure#0}}>" + } + }, + "symbol_name": "_ZN4core3ptr85drop_in_place$LT$std..rt..lang_start$LT$$LP$$RP$$GT$..$u7b$$u7b$closure$u7d$$u7d$$GT$17h" + }, + { + "details": null, + "mono_item_kind": { + "MonoItemFn": { + "body": { + "arg_count": 1, + "blocks": [ { "statements": [ - { - "kind": { - "StorageDead": 6 - }, - "span": 5 - }, { "kind": { "Assign": [ @@ -1843,168 +1657,49 @@ }, { "Use": { - "Copy": { - "local": 5, - "projection": [ - { - "Downcast": 0 - }, - { - "Field": [ - 0, - 6 - ] + "Constant": { + "const_": { + "kind": { + "Allocated": { + "align": 1, + "bytes": [ + 0 + ], + "mutability": "Mut", + "provenance": { + "ptrs": [] + } + } } - ] + }, + "user_ty": null } } } ] - }, - "span": 6 - }, - { - "kind": { - "StorageDead": 8 - }, - "span": 7 - }, - { - "kind": { - "StorageDead": 5 - }, - "span": 7 + } } ], "terminator": { - "kind": "Return", - "span": 4 + "kind": "Return" } } ], "locals": [ { - "mutability": "Mut", - "span": 8 - }, - { - "mutability": "Not", - "span": 9 - }, - { - "mutability": "Not", - "span": 10 - }, - { - "mutability": "Not", - "span": 11 - }, - { - "mutability": "Not", - "span": 12 - }, - { - "mutability": "Mut", - "span": 1 - }, - { - "mutability": "Mut", - "span": 2 - }, - { - "mutability": "Not", - "span": 2 + "mutability": "Mut" }, { - "mutability": "Not", - "span": 3 + "mutability": "Not" } ], - "span": 13, "spread_arg": null, - "var_debug_info": [ - { - "argument_index": 1, - "composite": null, - "name": "main", - "source_info": { - "scope": 0, - "span": 9 - }, - "value": { - "Place": { - "local": 1, - "projection": [] - } - } - }, - { - "argument_index": 2, - "composite": null, - "name": "argc", - "source_info": { - "scope": 0, - "span": 10 - }, - "value": { - "Place": { - "local": 2, - "projection": [] - } - } - }, - { - "argument_index": 3, - "composite": null, - "name": "argv", - "source_info": { - "scope": 0, - "span": 11 - }, - "value": { - "Place": { - "local": 3, - "projection": [] - } - } - }, - { - "argument_index": 4, - "composite": null, - "name": "sigpipe", - "source_info": { - "scope": 0, - "span": 12 - }, - "value": { - "Place": { - "local": 4, - "projection": [] - } - } - }, - { - "argument_index": null, - "composite": null, - "name": "v", - "source_info": { - "scope": 1, - "span": 6 - }, - "value": { - "Place": { - "local": 0, - "projection": [] - } - } - } - ] + "var_debug_info": [] }, - "id": 0, - "name": "std::rt::lang_start::<()>" + "name": "<() as std::process::Termination>::report" } }, - "symbol_name": "_ZN3std2rt10lang_start17h" + "symbol_name": "_ZN54_$LT$$LP$$RP$$u20$as$u20$std..process..Termination$GT$6report17h" } ], "types": [ @@ -2046,54 +1741,6 @@ } } ], - [ - { - "EnumType": { - "discriminants": [ - 0, - 1 - ], - "fields": "elided", - "layout": { - "abi": { - "Scalar": { - "Initialized": { - "valid_range": { - "end": 18446744073709551615, - "start": 0 - }, - "value": { - "Int": { - "length": "I64", - "signed": true - } - } - } - } - }, - "abi_align": 8, - "fields": { - "Arbitrary": { - "offsets": [ - { - "num_bits": 0 - } - ] - } - }, - "size": { - "num_bits": 64 - }, - "variants": { - "Single": { - "index": 0 - } - } - }, - "name": "std::result::Result" - } - } - ], [ { "StructType": { @@ -2509,39 +2156,6 @@ } } ], - [ - { - "RefType": { - "layout": { - "abi": { - "Scalar": { - "Initialized": { - "valid_range": { - "end": 18446744073709551615, - "start": 1 - }, - "value": { - "Pointer": 0 - } - } - } - }, - "abi_align": 8, - "fields": "Primitive", - "size": { - "num_bits": 64 - }, - "variants": { - "Single": { - "index": 0 - } - } - }, - "mutability": "Not", - "pointee_type": "elided" - } - } - ], [ { "RefType": { diff --git a/tests/integration/programs/ref-deref.smir.json.expected b/tests/integration/expected/nightly-2025-03-01/ref-deref.smir.json.expected similarity index 77% rename from tests/integration/programs/ref-deref.smir.json.expected rename to tests/integration/expected/nightly-2025-03-01/ref-deref.smir.json.expected index 19f6d2ff..1df3dd5c 100644 --- a/tests/integration/programs/ref-deref.smir.json.expected +++ b/tests/integration/expected/nightly-2025-03-01/ref-deref.smir.json.expected @@ -92,52 +92,66 @@ "mono_item_kind": { "MonoItemFn": { "body": { - "arg_count": 0, + "arg_count": 4, "blocks": [ { "statements": [ + { + "kind": { + "StorageLive": 5 + } + }, + { + "kind": { + "StorageLive": 7 + } + }, { "kind": { "Assign": [ { - "local": 1, + "local": 7, "projection": [] }, { - "Use": { - "Constant": { - "const_": { - "id": 9, - "kind": { - "Allocated": { - "align": 4, - "bytes": [ - 42, - 0, - 0, - 0 - ], - "mutability": "Mut", - "provenance": { - "ptrs": [] - } + "Aggregate": [ + { + "Closure": [ + 0, + [ + { + "Type": 0 + }, + { + "Type": 0 + }, + { + "Type": 0 + }, + { + "Type": 0 } + ] + ] + }, + [ + { + "Copy": { + "local": 1, + "projection": [] } - }, - "span": 51, - "user_ty": null - } - } + } + ] + ] } ] - }, - "span": 51 + } }, { "kind": { "Assign": [ { - "local": 2, + "local": 6, "projection": [] }, { @@ -147,277 +161,65 @@ }, "Shared", { - "local": 1, + "local": 7, "projection": [] } ] } ] - }, - "span": 52 + } }, { "kind": { "Assign": [ { - "local": 3, + "local": 5, "projection": [] }, { - "Use": { - "Copy": { - "local": 2, - "projection": [ - "Deref" - ] - } - } + "Cast": [ + { + "PointerCoercion": "Unsize" + }, + { + "Copy": { + "local": 6, + "projection": [] + } + }, + 0 + ] } ] - }, - "span": 53 + } } ], - "terminator": { - "kind": { - "SwitchInt": { - "discr": { - "Copy": { - "local": 3, - "projection": [] - } - }, - "targets": { - "branches": [ - [ - 42, - 1 - ] - ], - "otherwise": 2 - } - } - }, - "span": 50 - } - }, - { - "statements": [], - "terminator": { - "kind": "Return", - "span": 54 - } - }, - { - "statements": [], "terminator": { "kind": { "Call": { "args": [ { - "Constant": { - "const_": { - "id": 11, - "kind": { - "Allocated": { - "align": 8, - "bytes": [ - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 25, - 0, - 0, - 0, - 0, - 0, - 0, - 0 - ], - "mutability": "Mut", - "provenance": { - "ptrs": [ - [ - 0, - 0 - ] - ] - } - } - } - }, - "span": 32, - "user_ty": null + "Move": { + "local": 5, + "projection": [] } - } - ], - "destination": { - "local": 4, - "projection": [] - }, - "func": { - "Constant": { - "const_": { - "id": 10, - "kind": "ZeroSized" - }, - "span": 55, - "user_ty": null - } - }, - "target": null, - "unwind": "Continue" - } - }, - "span": 55 - } - } - ], - "locals": [ - { - "mutability": "Mut", - "span": 56 - }, - { - "mutability": "Not", - "span": 57 - }, - { - "mutability": "Not", - "span": 58 - }, - { - "mutability": "Not", - "span": 59 - }, - { - "mutability": "Mut", - "span": 55 - } - ], - "span": 60, - "spread_arg": null, - "var_debug_info": [ - { - "argument_index": null, - "composite": null, - "name": "a", - "source_info": { - "scope": 1, - "span": 57 - }, - "value": { - "Place": { - "local": 1, - "projection": [] - } - } - }, - { - "argument_index": null, - "composite": null, - "name": "b", - "source_info": { - "scope": 2, - "span": 58 - }, - "value": { - "Place": { - "local": 2, - "projection": [] - } - } - }, - { - "argument_index": null, - "composite": null, - "name": "c", - "source_info": { - "scope": 3, - "span": 59 - }, - "value": { - "Place": { - "local": 3, - "projection": [] - } - } - } - ] - }, - "id": 6, - "name": "main" - } - }, - "symbol_name": "_ZN9ref_deref4main17h" - }, - { - "details": null, - "mono_item_kind": { - "MonoItemFn": { - "body": { - "arg_count": 1, - "blocks": [ - { - "statements": [], - "terminator": { - "kind": "Return", - "span": 44 - } - } - ], - "locals": [ - { - "mutability": "Mut", - "span": 44 - }, - { - "mutability": "Not", - "span": 44 - } - ], - "span": 44, - "spread_arg": null, - "var_debug_info": [] - }, - "id": 4, - "name": "std::ptr::drop_in_place::<{closure@std::rt::lang_start<()>::{closure#0}}>" - } - }, - "symbol_name": "_ZN4core3ptr85drop_in_place$LT$std..rt..lang_start$LT$$LP$$RP$$GT$..$u7b$$u7b$closure$u7d$$u7d$$GT$17h" - }, - { - "details": null, - "mono_item_kind": { - "MonoItemFn": { - "body": { - "arg_count": 1, - "blocks": [ - { - "statements": [], - "terminator": { - "kind": { - "Call": { - "args": [ + }, { "Move": { - "local": 1, + "local": 2, "projection": [] } }, { - "Constant": { - "const_": { - "id": 4, - "kind": "ZeroSized" - }, - "span": 32, - "user_ty": null + "Move": { + "local": 3, + "projection": [] + } + }, + { + "Move": { + "local": 4, + "projection": [] } } ], @@ -428,90 +230,69 @@ "func": { "Constant": { "const_": { - "id": 3, "kind": "ZeroSized" }, - "span": 31, "user_ty": null } }, "target": 1, "unwind": "Continue" } - }, - "span": 33 + } } }, { - "statements": [], - "terminator": { - "kind": { - "Call": { - "args": [ - { - "Constant": { - "const_": { - "id": 4, - "kind": "ZeroSized" - }, - "span": 32, - "user_ty": null - } - } - ], - "destination": { - "local": 2, - "projection": [] - }, - "func": { - "Constant": { - "const_": { - "id": 5, - "kind": "ZeroSized" - }, - "span": 34, - "user_ty": null - } - }, - "target": 2, - "unwind": "Unreachable" + "statements": [ + { + "kind": { + "StorageDead": 5 } }, - "span": 35 - } - }, - { - "statements": [], + { + "kind": { + "StorageDead": 7 + } + } + ], "terminator": { - "kind": "Return", - "span": 36 + "kind": "Return" } } ], "locals": [ { - "mutability": "Mut", - "span": 37 + "mutability": "Mut" + }, + { + "mutability": "Not" }, { - "mutability": "Not", - "span": 38 + "mutability": "Not" }, { - "mutability": "Not", - "span": 39 + "mutability": "Not" + }, + { + "mutability": "Not" + }, + { + "mutability": "Mut" + }, + { + "mutability": "Not" + }, + { + "mutability": "Not" } ], - "span": 42, "spread_arg": null, "var_debug_info": [ { "argument_index": 1, "composite": null, - "name": "f", + "name": "main", "source_info": { - "scope": 0, - "span": 38 + "scope": 0 }, "value": { "Place": { @@ -521,136 +302,53 @@ } }, { - "argument_index": null, + "argument_index": 2, "composite": null, - "name": "result", + "name": "argc", "source_info": { - "scope": 1, - "span": 40 + "scope": 0 }, "value": { "Place": { - "local": 0, + "local": 2, "projection": [] } } }, { - "argument_index": 1, + "argument_index": 3, "composite": null, - "name": "dummy", + "name": "argv", "source_info": { - "scope": 2, - "span": 41 + "scope": 0 }, "value": { - "Const": { - "const_": { - "id": 4, - "kind": "ZeroSized" - }, - "span": 32, - "user_ty": null - } - } - } - ] - }, - "id": 2, - "name": "std::sys::backtrace::__rust_begin_short_backtrace::" - } - }, - "symbol_name": "_ZN3std3sys9backtrace28__rust_begin_short_backtrace17h" - }, - { - "details": null, - "mono_item_kind": { - "MonoItemFn": { - "body": { - "arg_count": 1, - "blocks": [ - { - "statements": [ - { - "kind": { - "Assign": [ - { - "local": 0, - "projection": [] - }, - { - "Use": { - "Constant": { - "const_": { - "id": 8, - "kind": { - "Allocated": { - "align": 1, - "bytes": [ - 0 - ], - "mutability": "Mut", - "provenance": { - "ptrs": [] - } - } - } - }, - "span": 46, - "user_ty": null - } - } - } - ] - }, - "span": 46 + "Place": { + "local": 3, + "projection": [] } - ], - "terminator": { - "kind": "Return", - "span": 45 } - } - ], - "locals": [ - { - "mutability": "Mut", - "span": 47 }, { - "mutability": "Not", - "span": 48 - } - ], - "span": 49, - "spread_arg": null, - "var_debug_info": [ - { - "argument_index": 1, + "argument_index": 4, "composite": null, - "name": "self", + "name": "sigpipe", "source_info": { - "scope": 0, - "span": 48 + "scope": 0 }, "value": { - "Const": { - "const_": { - "id": 4, - "kind": "ZeroSized" - }, - "span": 32, - "user_ty": null + "Place": { + "local": 4, + "projection": [] } } } ] }, - "id": 5, - "name": "<() as std::process::Termination>::report" + "name": "std::rt::lang_start::<()>" } }, - "symbol_name": "_ZN54_$LT$$LP$$RP$$u20$as$u20$std..process..Termination$GT$6report17h" + "symbol_name": "_ZN3std2rt10lang_start17h" }, { "details": null, @@ -664,20 +362,17 @@ { "kind": { "StorageLive": 2 - }, - "span": 16 + } }, { "kind": { "StorageLive": 3 - }, - "span": 15 + } }, { "kind": { "StorageLive": 4 - }, - "span": 17 + } }, { "kind": { @@ -695,7 +390,7 @@ { "Field": [ 0, - 7 + 0 ] } ] @@ -703,8 +398,7 @@ } } ] - }, - "span": 17 + } } ], "terminator": { @@ -725,18 +419,15 @@ "func": { "Constant": { "const_": { - "id": 1, "kind": "ZeroSized" }, - "span": 14, "user_ty": null } }, "target": 1, "unwind": "Continue" } - }, - "span": 15 + } } }, { @@ -744,8 +435,7 @@ { "kind": { "StorageDead": 4 - }, - "span": 19 + } } ], "terminator": { @@ -766,18 +456,15 @@ "func": { "Constant": { "const_": { - "id": 2, "kind": "ZeroSized" }, - "span": 18, "user_ty": null } }, "target": 2, "unwind": "Continue" } - }, - "span": 16 + } } }, { @@ -785,14 +472,12 @@ { "kind": { "StorageDead": 3 - }, - "span": 21 + } }, { "kind": { "StorageLive": 5 - }, - "span": 22 + } }, { "kind": { @@ -801,42 +486,6 @@ "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": { @@ -845,13 +494,13 @@ { "Field": [ 0, - 15 + 0 ] }, { "Field": [ 0, - 9 + 0 ] } ] @@ -859,8 +508,7 @@ } } ] - }, - "span": 23 + } }, { "kind": { @@ -874,73 +522,52 @@ "IntToInt", { "Move": { - "local": 6, + "local": 5, "projection": [] } }, - 16 + 0 ] } ] - }, - "span": 24 - }, - { - "kind": { - "StorageDead": 6 - }, - "span": 25 + } }, { "kind": { "StorageDead": 5 - }, - "span": 26 + } }, { "kind": { "StorageDead": 2 - }, - "span": 27 + } } ], "terminator": { - "kind": "Return", - "span": 20 + "kind": "Return" } } ], "locals": [ { - "mutability": "Mut", - "span": 28 - }, - { - "mutability": "Mut", - "span": 3 + "mutability": "Mut" }, { - "mutability": "Mut", - "span": 16 + "mutability": "Mut" }, { - "mutability": "Mut", - "span": 15 + "mutability": "Mut" }, { - "mutability": "Mut", - "span": 17 + "mutability": "Mut" }, { - "mutability": "Mut", - "span": 22 + "mutability": "Mut" }, { - "mutability": "Mut", - "span": 23 + "mutability": "Mut" } ], - "span": 3, "spread_arg": null, "var_debug_info": [ { @@ -948,8 +575,7 @@ "composite": null, "name": "main", "source_info": { - "scope": 0, - "span": 9 + "scope": 0 }, "value": { "Place": { @@ -959,7 +585,7 @@ { "Field": [ 0, - 7 + 0 ] } ] @@ -971,8 +597,7 @@ "composite": null, "name": "self", "source_info": { - "scope": 1, - "span": 29 + "scope": 1 }, "value": { "Place": { @@ -980,29 +605,163 @@ "projection": [] } } + } + ] + }, + "name": "std::rt::lang_start::<()>::{closure#0}" + } + }, + "symbol_name": "_ZN3std2rt10lang_start28_$u7b$$u7b$closure$u7d$$u7d$17h" + }, + { + "details": null, + "mono_item_kind": { + "MonoItemFn": { + "body": { + "arg_count": 1, + "blocks": [ + { + "statements": [], + "terminator": { + "kind": { + "Call": { + "args": [ + { + "Move": { + "local": 1, + "projection": [] + } + }, + { + "Constant": { + "const_": { + "kind": "ZeroSized" + }, + "user_ty": null + } + } + ], + "destination": { + "local": 0, + "projection": [] + }, + "func": { + "Constant": { + "const_": { + "kind": "ZeroSized" + }, + "user_ty": null + } + }, + "target": 1, + "unwind": "Continue" + } + } + } + }, + { + "statements": [], + "terminator": { + "kind": { + "Call": { + "args": [ + { + "Constant": { + "const_": { + "kind": "ZeroSized" + }, + "user_ty": null + } + } + ], + "destination": { + "local": 2, + "projection": [] + }, + "func": { + "Constant": { + "const_": { + "kind": "ZeroSized" + }, + "user_ty": null + } + }, + "target": 2, + "unwind": "Unreachable" + } + } + } + }, + { + "statements": [], + "terminator": { + "kind": "Return" + } + } + ], + "locals": [ + { + "mutability": "Mut" + }, + { + "mutability": "Not" }, + { + "mutability": "Not" + } + ], + "spread_arg": null, + "var_debug_info": [ { "argument_index": 1, "composite": null, - "name": "self", + "name": "f", + "source_info": { + "scope": 0 + }, + "value": { + "Place": { + "local": 1, + "projection": [] + } + } + }, + { + "argument_index": null, + "composite": null, + "name": "result", "source_info": { - "scope": 2, - "span": 30 + "scope": 1 }, "value": { "Place": { - "local": 5, + "local": 0, "projection": [] } } + }, + { + "argument_index": 1, + "composite": null, + "name": "dummy", + "source_info": { + "scope": 2 + }, + "value": { + "Const": { + "const_": { + "kind": "ZeroSized" + }, + "user_ty": null + } + } } ] }, - "id": 1, - "name": "std::rt::lang_start::<()>::{closure#0}" + "name": "std::sys::backtrace::__rust_begin_short_backtrace::" } }, - "symbol_name": "_ZN3std2rt10lang_start28_$u7b$$u7b$closure$u7d$$u7d$17h" + "symbol_name": "_ZN3std3sys9backtrace28__rust_begin_short_backtrace17h" }, { "details": null, @@ -1016,55 +775,65 @@ "terminator": { "kind": { "Call": { - "args": [], + "args": [ + { + "Move": { + "local": 1, + "projection": [ + "Deref" + ] + } + }, + { + "Move": { + "local": 2, + "projection": [] + } + } + ], "destination": { "local": 0, "projection": [] }, "func": { - "Move": { - "local": 1, - "projection": [] + "Constant": { + "const_": { + "kind": "ZeroSized" + }, + "user_ty": null } }, "target": 1, "unwind": "Continue" } - }, - "span": 43 + } } }, { "statements": [], "terminator": { - "kind": "Return", - "span": 43 + "kind": "Return" } } ], "locals": [ { - "mutability": "Mut", - "span": 43 + "mutability": "Mut" }, { - "mutability": "Not", - "span": 43 + "mutability": "Not" }, { - "mutability": "Not", - "span": 43 + "mutability": "Not" } ], - "span": 43, "spread_arg": 2, "var_debug_info": [] }, - "id": 3, - "name": ">::call_once" + "name": "<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once" } }, - "symbol_name": "_ZN4core3ops8function6FnOnce9call_once17h" + "symbol_name": "_ZN4core3ops8function6FnOnce40call_once$u7b$$u7b$vtable.shim$u7d$$u7d$17h" }, { "details": null, @@ -1078,74 +847,48 @@ "terminator": { "kind": { "Call": { - "args": [ - { - "Move": { - "local": 1, - "projection": [ - "Deref" - ] - } - }, - { - "Move": { - "local": 2, - "projection": [] - } - } - ], + "args": [], "destination": { "local": 0, "projection": [] }, "func": { - "Constant": { - "const_": { - "id": 6, - "kind": "ZeroSized" - }, - "span": 43, - "user_ty": null + "Move": { + "local": 1, + "projection": [] } }, "target": 1, "unwind": "Continue" } - }, - "span": 43 + } } }, { "statements": [], "terminator": { - "kind": "Return", - "span": 43 + "kind": "Return" } } ], "locals": [ { - "mutability": "Mut", - "span": 43 + "mutability": "Mut" }, { - "mutability": "Not", - "span": 43 + "mutability": "Not" }, { - "mutability": "Not", - "span": 43 + "mutability": "Not" } ], - "span": 43, "spread_arg": 2, "var_debug_info": [] }, - "id": 3, - "name": "<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once" + "name": ">::call_once" } }, - "symbol_name": "_ZN4core3ops8function6FnOnce40call_once$u7b$$u7b$vtable.shim$u7d$$u7d$17h" + "symbol_name": "_ZN4core3ops8function6FnOnce9call_once17h" }, { "details": null, @@ -1180,8 +923,7 @@ ] } ] - }, - "span": 43 + } } ], "terminator": { @@ -1208,10 +950,8 @@ "func": { "Constant": { "const_": { - "id": 7, "kind": "ZeroSized" }, - "span": 43, "user_ty": null } }, @@ -1220,8 +960,7 @@ "Cleanup": 3 } } - }, - "span": 43 + } } }, { @@ -1236,15 +975,13 @@ "target": 2, "unwind": "Continue" } - }, - "span": 43 + } } }, { "statements": [], "terminator": { - "kind": "Return", - "span": 43 + "kind": "Return" } }, { @@ -1259,41 +996,33 @@ "target": 4, "unwind": "Terminate" } - }, - "span": 43 + } } }, { "statements": [], "terminator": { - "kind": "Resume", - "span": 43 + "kind": "Resume" } } ], "locals": [ { - "mutability": "Mut", - "span": 43 + "mutability": "Mut" }, { - "mutability": "Not", - "span": 43 + "mutability": "Not" }, { - "mutability": "Not", - "span": 43 + "mutability": "Not" }, { - "mutability": "Not", - "span": 43 + "mutability": "Not" } ], - "span": 43, "spread_arg": 2, "var_debug_info": [] }, - "id": 3, "name": "<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once" } }, @@ -1304,273 +1033,297 @@ "mono_item_kind": { "MonoItemFn": { "body": { - "arg_count": 4, + "arg_count": 1, + "blocks": [ + { + "statements": [], + "terminator": { + "kind": "Return" + } + } + ], + "locals": [ + { + "mutability": "Mut" + }, + { + "mutability": "Not" + } + ], + "spread_arg": null, + "var_debug_info": [] + }, + "name": "std::ptr::drop_in_place::<{closure@std::rt::lang_start<()>::{closure#0}}>" + } + }, + "symbol_name": "_ZN4core3ptr85drop_in_place$LT$std..rt..lang_start$LT$$LP$$RP$$GT$..$u7b$$u7b$closure$u7d$$u7d$$GT$17h" + }, + { + "details": null, + "mono_item_kind": { + "MonoItemFn": { + "body": { + "arg_count": 1, "blocks": [ { "statements": [ - { - "kind": { - "StorageLive": 5 - }, - "span": 1 - }, - { - "kind": { - "StorageLive": 6 - }, - "span": 2 - }, - { - "kind": { - "StorageLive": 8 - }, - "span": 3 - }, { "kind": { "Assign": [ { - "local": 8, + "local": 0, "projection": [] }, { - "Aggregate": [ - { - "Closure": [ - 1, - [ - { - "Type": 1 - }, - { - "Type": 2 - }, - { - "Type": 3 - }, - { - "Type": 4 + "Use": { + "Constant": { + "const_": { + "kind": { + "Allocated": { + "align": 1, + "bytes": [ + 0 + ], + "mutability": "Mut", + "provenance": { + "ptrs": [] + } } - ] - ] - }, - [ - { - "Copy": { - "local": 1, - "projection": [] } - } - ] - ] - } - ] - }, - "span": 3 - }, - { - "kind": { - "Assign": [ - { - "local": 7, - "projection": [] - }, - { - "Ref": [ - { - "kind": "ReErased" - }, - "Shared", - { - "local": 8, - "projection": [] + }, + "user_ty": null } - ] + } } ] - }, - "span": 2 - }, + } + } + ], + "terminator": { + "kind": "Return" + } + } + ], + "locals": [ + { + "mutability": "Mut" + }, + { + "mutability": "Not" + } + ], + "spread_arg": null, + "var_debug_info": [] + }, + "name": "<() as std::process::Termination>::report" + } + }, + "symbol_name": "_ZN54_$LT$$LP$$RP$$u20$as$u20$std..process..Termination$GT$6report17h" + }, + { + "details": null, + "mono_item_kind": { + "MonoItemFn": { + "body": { + "arg_count": 0, + "blocks": [ + { + "statements": [ { "kind": { "Assign": [ { - "local": 6, + "local": 1, "projection": [] }, { - "Cast": [ - { - "PointerCoercion": "Unsize" - }, - { - "Copy": { - "local": 7, - "projection": [] - } - }, - 5 - ] - } - ] - }, - "span": 2 - } - ], - "terminator": { - "kind": { - "Call": { - "args": [ - { - "Move": { - "local": 6, - "projection": [] - } - }, - { - "Move": { - "local": 2, - "projection": [] - } - }, - { - "Move": { - "local": 3, - "projection": [] - } - }, - { - "Move": { - "local": 4, - "projection": [] + "Use": { + "Constant": { + "const_": { + "kind": { + "Allocated": { + "align": 4, + "bytes": [ + 42, + 0, + 0, + 0 + ], + "mutability": "Mut", + "provenance": { + "ptrs": [] + } + } + } + }, + "user_ty": null + } } } - ], - "destination": { - "local": 5, - "projection": [] - }, - "func": { - "Constant": { - "const_": { - "id": 0, - "kind": "ZeroSized" - }, - "span": 0, - "user_ty": null - } - }, - "target": 1, - "unwind": "Continue" + ] } }, - "span": 1 - } - }, - { - "statements": [ { "kind": { - "StorageDead": 6 - }, - "span": 5 + "Assign": [ + { + "local": 2, + "projection": [] + }, + { + "Ref": [ + { + "kind": "ReErased" + }, + "Shared", + { + "local": 1, + "projection": [] + } + ] + } + ] + } }, { "kind": { "Assign": [ { - "local": 0, + "local": 3, "projection": [] }, { "Use": { "Copy": { - "local": 5, + "local": 2, "projection": [ - { - "Downcast": 0 - }, - { - "Field": [ - 0, - 6 - ] - } + "Deref" ] } } } ] - }, - "span": 6 - }, - { - "kind": { - "StorageDead": 8 - }, - "span": 7 - }, - { - "kind": { - "StorageDead": 5 - }, - "span": 7 + } } ], "terminator": { - "kind": "Return", - "span": 4 + "kind": { + "SwitchInt": { + "discr": { + "Copy": { + "local": 3, + "projection": [] + } + }, + "targets": { + "branches": [ + [ + 42, + 1 + ] + ], + "otherwise": 2 + } + } + } } - } - ], - "locals": [ - { - "mutability": "Mut", - "span": 8 - }, - { - "mutability": "Not", - "span": 9 }, { - "mutability": "Not", - "span": 10 + "statements": [], + "terminator": { + "kind": "Return" + } }, { - "mutability": "Not", - "span": 11 - }, + "statements": [], + "terminator": { + "kind": { + "Call": { + "args": [ + { + "Constant": { + "const_": { + "kind": { + "Allocated": { + "align": 8, + "bytes": [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 25, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "mutability": "Mut", + "provenance": { + "ptrs": [ + [ + 0, + 0 + ] + ] + } + } + } + }, + "user_ty": null + } + } + ], + "destination": { + "local": 4, + "projection": [] + }, + "func": { + "Constant": { + "const_": { + "kind": "ZeroSized" + }, + "user_ty": null + } + }, + "target": null, + "unwind": "Continue" + } + } + } + } + ], + "locals": [ { - "mutability": "Not", - "span": 12 + "mutability": "Mut" }, { - "mutability": "Mut", - "span": 1 + "mutability": "Not" }, { - "mutability": "Mut", - "span": 2 + "mutability": "Not" }, { - "mutability": "Not", - "span": 2 + "mutability": "Not" }, { - "mutability": "Not", - "span": 3 + "mutability": "Mut" } ], - "span": 13, "spread_arg": null, "var_debug_info": [ { - "argument_index": 1, + "argument_index": null, "composite": null, - "name": "main", + "name": "a", "source_info": { - "scope": 0, - "span": 9 + "scope": 1 }, "value": { "Place": { @@ -1580,12 +1333,11 @@ } }, { - "argument_index": 2, + "argument_index": null, "composite": null, - "name": "argc", + "name": "b", "source_info": { - "scope": 0, - "span": 10 + "scope": 2 }, "value": { "Place": { @@ -1594,58 +1346,26 @@ } } }, - { - "argument_index": 3, - "composite": null, - "name": "argv", - "source_info": { - "scope": 0, - "span": 11 - }, - "value": { - "Place": { - "local": 3, - "projection": [] - } - } - }, - { - "argument_index": 4, - "composite": null, - "name": "sigpipe", - "source_info": { - "scope": 0, - "span": 12 - }, - "value": { - "Place": { - "local": 4, - "projection": [] - } - } - }, { "argument_index": null, "composite": null, - "name": "v", + "name": "c", "source_info": { - "scope": 1, - "span": 6 + "scope": 3 }, "value": { "Place": { - "local": 0, + "local": 3, "projection": [] } } } ] }, - "id": 0, - "name": "std::rt::lang_start::<()>" + "name": "main" } }, - "symbol_name": "_ZN3std2rt10lang_start17h" + "symbol_name": "_ZN9ref_deref4main17h" } ], "types": [ @@ -1682,54 +1402,6 @@ } } ], - [ - { - "EnumType": { - "discriminants": [ - 0, - 1 - ], - "fields": "elided", - "layout": { - "abi": { - "Scalar": { - "Initialized": { - "valid_range": { - "end": 18446744073709551615, - "start": 0 - }, - "value": { - "Int": { - "length": "I64", - "signed": true - } - } - } - } - }, - "abi_align": 8, - "fields": { - "Arbitrary": { - "offsets": [ - { - "num_bits": 0 - } - ] - } - }, - "size": { - "num_bits": 64 - }, - "variants": { - "Single": { - "index": 0 - } - } - }, - "name": "std::result::Result" - } - } - ], [ { "StructType": { @@ -2116,39 +1788,6 @@ } } ], - [ - { - "RefType": { - "layout": { - "abi": { - "Scalar": { - "Initialized": { - "valid_range": { - "end": 18446744073709551615, - "start": 1 - }, - "value": { - "Pointer": 0 - } - } - } - }, - "abi_align": 8, - "fields": "Primitive", - "size": { - "num_bits": 64 - }, - "variants": { - "Single": { - "index": 0 - } - } - }, - "mutability": "Not", - "pointee_type": "elided" - } - } - ], [ { "RefType": { diff --git a/tests/integration/programs/shl_min.smir.json.expected b/tests/integration/expected/nightly-2025-03-01/shl_min.smir.json.expected similarity index 84% rename from tests/integration/programs/shl_min.smir.json.expected rename to tests/integration/expected/nightly-2025-03-01/shl_min.smir.json.expected index 7690d038..a84f5fb1 100644 --- a/tests/integration/programs/shl_min.smir.json.expected +++ b/tests/integration/expected/nightly-2025-03-01/shl_min.smir.json.expected @@ -360,481 +360,393 @@ "mono_item_kind": { "MonoItemFn": { "body": { - "arg_count": 0, + "arg_count": 4, "blocks": [ { "statements": [ + { + "kind": { + "StorageLive": 5 + } + }, + { + "kind": { + "StorageLive": 7 + } + }, { "kind": { "Assign": [ { - "local": 2, + "local": 7, "projection": [] }, { - "Cast": [ - "IntToInt", + "Aggregate": [ { - "Constant": { - "const_": { - "id": 10, - "kind": { - "Allocated": { - "align": 4, - "bytes": [ - 1, - 0, - 0, - 0 - ], - "mutability": "Mut", - "provenance": { - "ptrs": [] - } - } + "Closure": [ + 0, + [ + { + "Type": 0 + }, + { + "Type": 0 + }, + { + "Type": 0 + }, + { + "Type": 0 } - }, - "span": 51, - "user_ty": null - } + ] + ] }, - 25 + [ + { + "Copy": { + "local": 1, + "projection": [] + } + } + ] ] } ] - }, - "span": 52 + } }, { "kind": { "Assign": [ { - "local": 3, + "local": 6, "projection": [] }, { - "BinaryOp": [ - "Lt", + "Ref": [ { - "Move": { - "local": 2, - "projection": [] - } + "kind": "ReErased" }, + "Shared", { - "Constant": { - "const_": { - "id": 11, - "kind": { - "Allocated": { - "align": 4, - "bytes": [ - 8, - 0, - 0, - 0 - ], - "mutability": "Mut", - "provenance": { - "ptrs": [] - } - } - } - }, - "span": 52, - "user_ty": null - } + "local": 7, + "projection": [] } ] } ] - }, - "span": 52 - } - ], - "terminator": { - "kind": { - "Assert": { - "cond": { - "Move": { - "local": 3, - "projection": [] - } - }, - "expected": true, - "msg": { - "Overflow": [ - "Shl", - { - "Constant": { - "const_": { - "id": 9, - "kind": { - "Allocated": { - "align": 1, - "bytes": [ - 128 - ], - "mutability": "Mut", - "provenance": { - "ptrs": [] - } - } - } - }, - "span": 50, - "user_ty": null - } - }, - { - "Constant": { - "const_": { - "id": 10, - "kind": { - "Allocated": { - "align": 4, - "bytes": [ - 1, - 0, - 0, - 0 - ], - "mutability": "Mut", - "provenance": { - "ptrs": [] - } - } - } - }, - "span": 51, - "user_ty": null - } - } - ] - }, - "target": 1, - "unwind": "Continue" } }, - "span": 52 - } - }, - { - "statements": [ { "kind": { "Assign": [ { - "local": 1, + "local": 5, "projection": [] }, { - "BinaryOp": [ - "Shl", + "Cast": [ { - "Constant": { - "const_": { - "id": 9, - "kind": { - "Allocated": { - "align": 1, - "bytes": [ - 128 - ], - "mutability": "Mut", - "provenance": { - "ptrs": [] - } - } - } - }, - "span": 50, - "user_ty": null - } + "PointerCoercion": "Unsize" }, { - "Constant": { - "const_": { - "id": 10, - "kind": { - "Allocated": { - "align": 4, - "bytes": [ - 1, - 0, - 0, - 0 - ], - "mutability": "Mut", - "provenance": { - "ptrs": [] - } - } - } - }, - "span": 51, - "user_ty": null + "Copy": { + "local": 6, + "projection": [] } - } + }, + 0 ] } ] - }, - "span": 52 + } } ], "terminator": { "kind": { - "SwitchInt": { - "discr": { - "Move": { - "local": 1, - "projection": [] + "Call": { + "args": [ + { + "Move": { + "local": 5, + "projection": [] + } + }, + { + "Move": { + "local": 2, + "projection": [] + } + }, + { + "Move": { + "local": 3, + "projection": [] + } + }, + { + "Move": { + "local": 4, + "projection": [] + } } + ], + "destination": { + "local": 0, + "projection": [] }, - "targets": { - "branches": [ - [ - 0, - 2 - ] - ], - "otherwise": 3 - } + "func": { + "Constant": { + "const_": { + "kind": "ZeroSized" + }, + "user_ty": null + } + }, + "target": 1, + "unwind": "Continue" } - }, - "span": 53 + } } }, { "statements": [ { "kind": { - "Assign": [ - { - "local": 6, - "projection": [] - }, - { - "Cast": [ - "IntToInt", - { - "Constant": { - "const_": { - "id": 10, - "kind": { - "Allocated": { - "align": 4, - "bytes": [ - 1, - 0, - 0, - 0 - ], - "mutability": "Mut", - "provenance": { - "ptrs": [] - } - } - } - }, - "span": 55, - "user_ty": null - } - }, - 25 - ] - } - ] - }, - "span": 56 + "StorageDead": 5 + } + }, + { + "kind": { + "StorageDead": 7 + } + } + ], + "terminator": { + "kind": "Return" + } + } + ], + "locals": [ + { + "mutability": "Mut" + }, + { + "mutability": "Not" + }, + { + "mutability": "Not" + }, + { + "mutability": "Not" + }, + { + "mutability": "Not" + }, + { + "mutability": "Mut" + }, + { + "mutability": "Not" + }, + { + "mutability": "Not" + } + ], + "spread_arg": null, + "var_debug_info": [ + { + "argument_index": 1, + "composite": null, + "name": "main", + "source_info": { + "scope": 0 + }, + "value": { + "Place": { + "local": 1, + "projection": [] + } + } + }, + { + "argument_index": 2, + "composite": null, + "name": "argc", + "source_info": { + "scope": 0 + }, + "value": { + "Place": { + "local": 2, + "projection": [] + } + } + }, + { + "argument_index": 3, + "composite": null, + "name": "argv", + "source_info": { + "scope": 0 + }, + "value": { + "Place": { + "local": 3, + "projection": [] + } + } + }, + { + "argument_index": 4, + "composite": null, + "name": "sigpipe", + "source_info": { + "scope": 0 + }, + "value": { + "Place": { + "local": 4, + "projection": [] + } + } + } + ] + }, + "name": "std::rt::lang_start::<()>" + } + }, + "symbol_name": "_ZN3std2rt10lang_start17h" + }, + { + "details": null, + "mono_item_kind": { + "MonoItemFn": { + "body": { + "arg_count": 1, + "blocks": [ + { + "statements": [ + { + "kind": { + "StorageLive": 2 + } + }, + { + "kind": { + "StorageLive": 3 + } + }, + { + "kind": { + "StorageLive": 4 + } }, { "kind": { "Assign": [ { - "local": 7, + "local": 4, "projection": [] }, { - "BinaryOp": [ - "Lt", - { - "Move": { - "local": 6, - "projection": [] - } - }, - { - "Constant": { - "const_": { - "id": 13, - "kind": { - "Allocated": { - "align": 4, - "bytes": [ - 16, - 0, - 0, - 0 - ], - "mutability": "Mut", - "provenance": { - "ptrs": [] - } - } - } - }, - "span": 56, - "user_ty": null - } + "Use": { + "Copy": { + "local": 1, + "projection": [ + "Deref", + { + "Field": [ + 0, + 0 + ] + } + ] } - ] + } } ] - }, - "span": 56 + } } ], "terminator": { "kind": { - "Assert": { - "cond": { - "Move": { - "local": 7, - "projection": [] + "Call": { + "args": [ + { + "Move": { + "local": 4, + "projection": [] + } } + ], + "destination": { + "local": 3, + "projection": [] }, - "expected": true, - "msg": { - "Overflow": [ - "Shl", - { - "Constant": { - "const_": { - "id": 12, - "kind": { - "Allocated": { - "align": 2, - "bytes": [ - 0, - 128 - ], - "mutability": "Mut", - "provenance": { - "ptrs": [] - } - } - } - }, - "span": 54, - "user_ty": null - } + "func": { + "Constant": { + "const_": { + "kind": "ZeroSized" }, - { - "Constant": { - "const_": { - "id": 10, - "kind": { - "Allocated": { - "align": 4, - "bytes": [ - 1, - 0, - 0, - 0 - ], - "mutability": "Mut", - "provenance": { - "ptrs": [] - } - } - } - }, - "span": 55, - "user_ty": null - } - } - ] + "user_ty": null + } }, - "target": 4, + "target": 1, "unwind": "Continue" } - }, - "span": 56 + } } }, { - "statements": [], + "statements": [ + { + "kind": { + "StorageDead": 4 + } + } + ], "terminator": { "kind": { "Call": { "args": [ { - "Constant": { - "const_": { - "id": 15, - "kind": { - "Allocated": { - "align": 8, - "bytes": [ - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 35, - 0, - 0, - 0, - 0, - 0, - 0, - 0 - ], - "mutability": "Mut", - "provenance": { - "ptrs": [ - [ - 0, - 0 - ] - ] - } - } - } - }, - "span": 32, - "user_ty": null + "Move": { + "local": 3, + "projection": [] } } ], "destination": { - "local": 4, + "local": 2, "projection": [] }, "func": { "Constant": { "const_": { - "id": 14, "kind": "ZeroSized" }, - "span": 57, "user_ty": null } }, - "target": null, + "target": 2, "unwind": "Continue" } - }, - "span": 57 + } } }, { "statements": [ + { + "kind": { + "StorageDead": 3 + } + }, + { + "kind": { + "StorageLive": 5 + } + }, { "kind": { "Assign": [ @@ -843,244 +755,289 @@ "projection": [] }, { - "BinaryOp": [ - "Shl", - { - "Constant": { - "const_": { - "id": 12, - "kind": { - "Allocated": { - "align": 2, - "bytes": [ - 0, - 128 - ], - "mutability": "Mut", - "provenance": { - "ptrs": [] - } - } - } - }, - "span": 54, - "user_ty": null - } - }, - { - "Constant": { - "const_": { - "id": 10, - "kind": { - "Allocated": { - "align": 4, - "bytes": [ - 1, - 0, - 0, - 0 - ], - "mutability": "Mut", - "provenance": { - "ptrs": [] - } - } - } + "Use": { + "Copy": { + "local": 2, + "projection": [ + { + "Field": [ + 0, + 0 + ] }, - "span": 55, - "user_ty": null - } - } - ] - } - ] - }, - "span": 56 - } - ], - "terminator": { - "kind": { - "SwitchInt": { - "discr": { - "Move": { - "local": 5, - "projection": [] - } - }, - "targets": { - "branches": [ - [ - 0, - 5 - ] - ], - "otherwise": 6 - } + { + "Field": [ + 0, + 0 + ] + } + ] + } + } + } + ] } }, - "span": 58 - } - }, - { - "statements": [ { "kind": { "Assign": [ { - "local": 10, + "local": 0, "projection": [] }, { "Cast": [ "IntToInt", { - "Constant": { - "const_": { - "id": 10, - "kind": { - "Allocated": { - "align": 4, - "bytes": [ - 1, - 0, - 0, - 0 - ], - "mutability": "Mut", - "provenance": { - "ptrs": [] - } - } - } - }, - "span": 60, - "user_ty": null + "Move": { + "local": 5, + "projection": [] } }, - 25 + 0 ] } ] - }, - "span": 61 + } }, { "kind": { - "Assign": [ + "StorageDead": 5 + } + }, + { + "kind": { + "StorageDead": 2 + } + } + ], + "terminator": { + "kind": "Return" + } + } + ], + "locals": [ + { + "mutability": "Mut" + }, + { + "mutability": "Mut" + }, + { + "mutability": "Mut" + }, + { + "mutability": "Mut" + }, + { + "mutability": "Mut" + }, + { + "mutability": "Mut" + } + ], + "spread_arg": null, + "var_debug_info": [ + { + "argument_index": null, + "composite": null, + "name": "main", + "source_info": { + "scope": 0 + }, + "value": { + "Place": { + "local": 1, + "projection": [ + "Deref", + { + "Field": [ + 0, + 0 + ] + } + ] + } + } + }, + { + "argument_index": 1, + "composite": null, + "name": "self", + "source_info": { + "scope": 1 + }, + "value": { + "Place": { + "local": 2, + "projection": [] + } + } + } + ] + }, + "name": "std::rt::lang_start::<()>::{closure#0}" + } + }, + "symbol_name": "_ZN3std2rt10lang_start28_$u7b$$u7b$closure$u7d$$u7d$17h" + }, + { + "details": null, + "mono_item_kind": { + "MonoItemFn": { + "body": { + "arg_count": 1, + "blocks": [ + { + "statements": [], + "terminator": { + "kind": { + "Call": { + "args": [ { - "local": 11, - "projection": [] + "Move": { + "local": 1, + "projection": [] + } }, { - "BinaryOp": [ - "Lt", - { - "Move": { - "local": 10, - "projection": [] - } + "Constant": { + "const_": { + "kind": "ZeroSized" }, - { - "Constant": { - "const_": { - "id": 17, - "kind": { - "Allocated": { - "align": 4, - "bytes": [ - 32, - 0, - 0, - 0 - ], - "mutability": "Mut", - "provenance": { - "ptrs": [] - } - } - } - }, - "span": 61, - "user_ty": null - } - } - ] + "user_ty": null + } } - ] - }, - "span": 61 + ], + "destination": { + "local": 0, + "projection": [] + }, + "func": { + "Constant": { + "const_": { + "kind": "ZeroSized" + }, + "user_ty": null + } + }, + "target": 1, + "unwind": "Continue" + } } - ], + } + }, + { + "statements": [], "terminator": { "kind": { - "Assert": { - "cond": { - "Move": { - "local": 11, - "projection": [] + "Call": { + "args": [ + { + "Constant": { + "const_": { + "kind": "ZeroSized" + }, + "user_ty": null + } } + ], + "destination": { + "local": 2, + "projection": [] }, - "expected": true, - "msg": { - "Overflow": [ - "Shl", - { - "Constant": { - "const_": { - "id": 16, - "kind": { - "Allocated": { - "align": 4, - "bytes": [ - 0, - 0, - 0, - 128 - ], - "mutability": "Mut", - "provenance": { - "ptrs": [] - } - } - } - }, - "span": 59, - "user_ty": null - } + "func": { + "Constant": { + "const_": { + "kind": "ZeroSized" }, - { - "Constant": { - "const_": { - "id": 10, - "kind": { - "Allocated": { - "align": 4, - "bytes": [ - 1, - 0, - 0, - 0 - ], - "mutability": "Mut", - "provenance": { - "ptrs": [] - } - } - } - }, - "span": 60, - "user_ty": null - } - } - ] + "user_ty": null + } }, - "target": 7, - "unwind": "Continue" + "target": 2, + "unwind": "Unreachable" } - }, - "span": 61 + } + } + }, + { + "statements": [], + "terminator": { + "kind": "Return" + } + } + ], + "locals": [ + { + "mutability": "Mut" + }, + { + "mutability": "Not" + }, + { + "mutability": "Not" + } + ], + "spread_arg": null, + "var_debug_info": [ + { + "argument_index": 1, + "composite": null, + "name": "f", + "source_info": { + "scope": 0 + }, + "value": { + "Place": { + "local": 1, + "projection": [] + } + } + }, + { + "argument_index": null, + "composite": null, + "name": "result", + "source_info": { + "scope": 1 + }, + "value": { + "Place": { + "local": 0, + "projection": [] + } } }, + { + "argument_index": 1, + "composite": null, + "name": "dummy", + "source_info": { + "scope": 2 + }, + "value": { + "Const": { + "const_": { + "kind": "ZeroSized" + }, + "user_ty": null + } + } + } + ] + }, + "name": "std::sys::backtrace::__rust_begin_short_backtrace::" + } + }, + "symbol_name": "_ZN3std3sys9backtrace28__rust_begin_short_backtrace17h" + }, + { + "details": null, + "mono_item_kind": { + "MonoItemFn": { + "body": { + "arg_count": 2, + "blocks": [ { "statements": [], "terminator": { @@ -1088,492 +1045,363 @@ "Call": { "args": [ { - "Constant": { - "const_": { - "id": 18, - "kind": { - "Allocated": { - "align": 8, - "bytes": [ - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 38, - 0, - 0, - 0, - 0, - 0, - 0, - 0 - ], - "mutability": "Mut", - "provenance": { - "ptrs": [ - [ - 0, - 1 - ] - ] - } - } - } - }, - "span": 32, - "user_ty": null + "Move": { + "local": 1, + "projection": [ + "Deref" + ] + } + }, + { + "Move": { + "local": 2, + "projection": [] } } ], "destination": { - "local": 8, + "local": 0, "projection": [] }, "func": { "Constant": { "const_": { - "id": 14, "kind": "ZeroSized" }, - "span": 62, "user_ty": null } }, - "target": null, + "target": 1, "unwind": "Continue" } - }, - "span": 62 + } } }, { - "statements": [ - { - "kind": { - "Assign": [ - { - "local": 9, - "projection": [] - }, - { - "BinaryOp": [ - "Shl", - { - "Constant": { - "const_": { - "id": 16, - "kind": { - "Allocated": { - "align": 4, - "bytes": [ - 0, - 0, - 0, - 128 - ], - "mutability": "Mut", - "provenance": { - "ptrs": [] - } - } - } - }, - "span": 59, - "user_ty": null - } - }, - { - "Constant": { - "const_": { - "id": 10, - "kind": { - "Allocated": { - "align": 4, - "bytes": [ - 1, - 0, - 0, - 0 - ], - "mutability": "Mut", - "provenance": { - "ptrs": [] - } - } - } - }, - "span": 60, - "user_ty": null - } - } - ] - } - ] - }, - "span": 61 - } - ], + "statements": [], + "terminator": { + "kind": "Return" + } + } + ], + "locals": [ + { + "mutability": "Mut" + }, + { + "mutability": "Not" + }, + { + "mutability": "Not" + } + ], + "spread_arg": 2, + "var_debug_info": [] + }, + "name": "<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once" + } + }, + "symbol_name": "_ZN4core3ops8function6FnOnce40call_once$u7b$$u7b$vtable.shim$u7d$$u7d$17h" + }, + { + "details": null, + "mono_item_kind": { + "MonoItemFn": { + "body": { + "arg_count": 2, + "blocks": [ + { + "statements": [], "terminator": { "kind": { - "SwitchInt": { - "discr": { + "Call": { + "args": [], + "destination": { + "local": 0, + "projection": [] + }, + "func": { "Move": { - "local": 9, + "local": 1, "projection": [] } }, - "targets": { - "branches": [ - [ - 0, - 8 - ] - ], - "otherwise": 9 - } + "target": 1, + "unwind": "Continue" } - }, - "span": 63 + } + } + }, + { + "statements": [], + "terminator": { + "kind": "Return" } + } + ], + "locals": [ + { + "mutability": "Mut" + }, + { + "mutability": "Not" }, + { + "mutability": "Not" + } + ], + "spread_arg": 2, + "var_debug_info": [] + }, + "name": ">::call_once" + } + }, + "symbol_name": "_ZN4core3ops8function6FnOnce9call_once17h" + }, + { + "details": null, + "mono_item_kind": { + "MonoItemFn": { + "body": { + "arg_count": 2, + "blocks": [ { "statements": [ { "kind": { "Assign": [ { - "local": 14, + "local": 3, "projection": [] }, { - "Cast": [ - "IntToInt", + "Ref": [ { - "Constant": { - "const_": { - "id": 10, - "kind": { - "Allocated": { - "align": 4, - "bytes": [ - 1, - 0, - 0, - 0 - ], - "mutability": "Mut", - "provenance": { - "ptrs": [] - } - } - } - }, - "span": 65, - "user_ty": null - } + "kind": "ReErased" }, - 25 - ] - } - ] - }, - "span": 66 - }, - { - "kind": { - "Assign": [ - { - "local": 15, - "projection": [] - }, - { - "BinaryOp": [ - "Lt", { - "Move": { - "local": 14, - "projection": [] + "Mut": { + "kind": "Default" } }, { - "Constant": { - "const_": { - "id": 20, - "kind": { - "Allocated": { - "align": 4, - "bytes": [ - 64, - 0, - 0, - 0 - ], - "mutability": "Mut", - "provenance": { - "ptrs": [] - } - } - } - }, - "span": 66, - "user_ty": null - } + "local": 1, + "projection": [] } ] } ] - }, - "span": 66 + } } ], - "terminator": { - "kind": { - "Assert": { - "cond": { - "Move": { - "local": 15, - "projection": [] - } - }, - "expected": true, - "msg": { - "Overflow": [ - "Shl", - { - "Constant": { - "const_": { - "id": 19, - "kind": { - "Allocated": { - "align": 8, - "bytes": [ - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 128 - ], - "mutability": "Mut", - "provenance": { - "ptrs": [] - } - } - } - }, - "span": 64, - "user_ty": null - } - }, - { - "Constant": { - "const_": { - "id": 10, - "kind": { - "Allocated": { - "align": 4, - "bytes": [ - 1, - 0, - 0, - 0 - ], - "mutability": "Mut", - "provenance": { - "ptrs": [] - } - } - } - }, - "span": 65, - "user_ty": null - } - } - ] - }, - "target": 10, - "unwind": "Continue" - } - }, - "span": 66 - } - }, - { - "statements": [], "terminator": { "kind": { "Call": { "args": [ { - "Constant": { - "const_": { - "id": 21, - "kind": { - "Allocated": { - "align": 8, - "bytes": [ - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 43, - 0, - 0, - 0, - 0, - 0, - 0, - 0 - ], - "mutability": "Mut", - "provenance": { - "ptrs": [ - [ - 0, - 2 - ] - ] - } - } - } - }, - "span": 32, - "user_ty": null + "Move": { + "local": 3, + "projection": [] + } + }, + { + "Move": { + "local": 2, + "projection": [] } } ], "destination": { - "local": 12, + "local": 0, "projection": [] }, "func": { "Constant": { "const_": { - "id": 14, "kind": "ZeroSized" }, - "span": 67, "user_ty": null } }, - "target": null, + "target": 1, + "unwind": { + "Cleanup": 3 + } + } + } + } + }, + { + "statements": [], + "terminator": { + "kind": { + "Drop": { + "place": { + "local": 1, + "projection": [] + }, + "target": 2, "unwind": "Continue" } - }, - "span": 67 + } + } + }, + { + "statements": [], + "terminator": { + "kind": "Return" + } + }, + { + "statements": [], + "terminator": { + "kind": { + "Drop": { + "place": { + "local": 1, + "projection": [] + }, + "target": 4, + "unwind": "Terminate" + } + } + } + }, + { + "statements": [], + "terminator": { + "kind": "Resume" + } + } + ], + "locals": [ + { + "mutability": "Mut" + }, + { + "mutability": "Not" + }, + { + "mutability": "Not" + }, + { + "mutability": "Not" + } + ], + "spread_arg": 2, + "var_debug_info": [] + }, + "name": "<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once" + } + }, + "symbol_name": "_ZN4core3ops8function6FnOnce9call_once17h" + }, + { + "details": null, + "mono_item_kind": { + "MonoItemFn": { + "body": { + "arg_count": 1, + "blocks": [ + { + "statements": [], + "terminator": { + "kind": "Return" } + } + ], + "locals": [ + { + "mutability": "Mut" }, + { + "mutability": "Not" + } + ], + "spread_arg": null, + "var_debug_info": [] + }, + "name": "std::ptr::drop_in_place::<{closure@std::rt::lang_start<()>::{closure#0}}>" + } + }, + "symbol_name": "_ZN4core3ptr85drop_in_place$LT$std..rt..lang_start$LT$$LP$$RP$$GT$..$u7b$$u7b$closure$u7d$$u7d$$GT$17h" + }, + { + "details": null, + "mono_item_kind": { + "MonoItemFn": { + "body": { + "arg_count": 1, + "blocks": [ { "statements": [ { "kind": { "Assign": [ { - "local": 13, + "local": 0, "projection": [] }, { - "BinaryOp": [ - "Shl", - { - "Constant": { - "const_": { - "id": 19, - "kind": { - "Allocated": { - "align": 8, - "bytes": [ - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 128 - ], - "mutability": "Mut", - "provenance": { - "ptrs": [] - } - } - } - }, - "span": 64, - "user_ty": null - } - }, - { - "Constant": { - "const_": { - "id": 10, - "kind": { - "Allocated": { - "align": 4, - "bytes": [ - 1, - 0, - 0, - 0 - ], - "mutability": "Mut", - "provenance": { - "ptrs": [] - } + "Use": { + "Constant": { + "const_": { + "kind": { + "Allocated": { + "align": 1, + "bytes": [ + 0 + ], + "mutability": "Mut", + "provenance": { + "ptrs": [] } } - }, - "span": 65, - "user_ty": null - } + } + }, + "user_ty": null } - ] + } } ] - }, - "span": 66 + } } ], "terminator": { - "kind": { - "SwitchInt": { - "discr": { - "Move": { - "local": 13, - "projection": [] - } - }, - "targets": { - "branches": [ - [ - 0, - 11 - ] - ], - "otherwise": 12 - } - } - }, - "span": 68 + "kind": "Return" } + } + ], + "locals": [ + { + "mutability": "Mut" }, + { + "mutability": "Not" + } + ], + "spread_arg": null, + "var_debug_info": [] + }, + "name": "<() as std::process::Termination>::report" + } + }, + "symbol_name": "_ZN54_$LT$$LP$$RP$$u20$as$u20$std..process..Termination$GT$6report17h" + }, + { + "details": null, + "mono_item_kind": { + "MonoItemFn": { + "body": { + "arg_count": 0, + "blocks": [ { "statements": [ { "kind": { "Assign": [ { - "local": 18, + "local": 2, "projection": [] }, { @@ -1582,7 +1410,6 @@ { "Constant": { "const_": { - "id": 10, "kind": { "Allocated": { "align": 4, @@ -1599,22 +1426,20 @@ } } }, - "span": 70, "user_ty": null } }, - 25 + 0 ] } ] - }, - "span": 71 + } }, { "kind": { "Assign": [ { - "local": 19, + "local": 3, "projection": [] }, { @@ -1622,19 +1447,18 @@ "Lt", { "Move": { - "local": 18, + "local": 2, "projection": [] } }, { "Constant": { "const_": { - "id": 23, "kind": { "Allocated": { "align": 4, "bytes": [ - 128, + 8, 0, 0, 0 @@ -1646,15 +1470,13 @@ } } }, - "span": 71, "user_ty": null } } ] } ] - }, - "span": 71 + } } ], "terminator": { @@ -1662,7 +1484,7 @@ "Assert": { "cond": { "Move": { - "local": 19, + "local": 3, "projection": [] } }, @@ -1673,26 +1495,10 @@ { "Constant": { "const_": { - "id": 22, "kind": { "Allocated": { - "align": 16, + "align": 1, "bytes": [ - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, 128 ], "mutability": "Mut", @@ -1702,14 +1508,12 @@ } } }, - "span": 69, "user_ty": null } }, { "Constant": { "const_": { - "id": 10, "kind": { "Allocated": { "align": 4, @@ -1726,86 +1530,15 @@ } } }, - "span": 70, "user_ty": null } } ] }, - "target": 13, - "unwind": "Continue" - } - }, - "span": 71 - } - }, - { - "statements": [], - "terminator": { - "kind": { - "Call": { - "args": [ - { - "Constant": { - "const_": { - "id": 24, - "kind": { - "Allocated": { - "align": 8, - "bytes": [ - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 52, - 0, - 0, - 0, - 0, - 0, - 0, - 0 - ], - "mutability": "Mut", - "provenance": { - "ptrs": [ - [ - 0, - 3 - ] - ] - } - } - } - }, - "span": 32, - "user_ty": null - } - } - ], - "destination": { - "local": 16, - "projection": [] - }, - "func": { - "Constant": { - "const_": { - "id": 14, - "kind": "ZeroSized" - }, - "span": 72, - "user_ty": null - } - }, - "target": null, + "target": 1, "unwind": "Continue" } - }, - "span": 72 + } } }, { @@ -1814,7 +1547,7 @@ "kind": { "Assign": [ { - "local": 17, + "local": 1, "projection": [] }, { @@ -1823,26 +1556,10 @@ { "Constant": { "const_": { - "id": 22, "kind": { "Allocated": { - "align": 16, + "align": 1, "bytes": [ - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, 128 ], "mutability": "Mut", @@ -1852,14 +1569,12 @@ } } }, - "span": 69, "user_ty": null } }, { "Constant": { "const_": { - "id": 10, "kind": { "Allocated": { "align": 4, @@ -1876,15 +1591,13 @@ } } }, - "span": 70, "user_ty": null } } ] } ] - }, - "span": 71 + } } ], "terminator": { @@ -1892,7 +1605,7 @@ "SwitchInt": { "discr": { "Move": { - "local": 17, + "local": 1, "projection": [] } }, @@ -1900,273 +1613,160 @@ "branches": [ [ 0, - 14 + 2 ] ], - "otherwise": 15 + "otherwise": 3 } } - }, - "span": 73 - } - }, - { - "statements": [], - "terminator": { - "kind": "Return", - "span": 74 + } } }, { - "statements": [], - "terminator": { - "kind": { - "Call": { - "args": [ + "statements": [ + { + "kind": { + "Assign": [ { - "Constant": { - "const_": { - "id": 25, - "kind": { - "Allocated": { - "align": 8, - "bytes": [ - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 73, - 0, - 0, - 0, - 0, - 0, - 0, - 0 - ], - "mutability": "Mut", - "provenance": { - "ptrs": [ - [ + "local": 6, + "projection": [] + }, + { + "Cast": [ + "IntToInt", + { + "Constant": { + "const_": { + "kind": { + "Allocated": { + "align": 4, + "bytes": [ + 1, 0, - 4 - ] - ] + 0, + 0 + ], + "mutability": "Mut", + "provenance": { + "ptrs": [] + } + } } - } + }, + "user_ty": null } }, - "span": 32, - "user_ty": null - } - } - ], - "destination": { - "local": 20, - "projection": [] - }, - "func": { - "Constant": { - "const_": { - "id": 14, - "kind": "ZeroSized" - }, - "span": 75, - "user_ty": null + 0 + ] } - }, - "target": null, - "unwind": "Continue" + ] } }, - "span": 75 - } - } - ], - "locals": [ - { - "mutability": "Mut", - "span": 76 - }, - { - "mutability": "Mut", - "span": 52 - }, - { - "mutability": "Mut", - "span": 52 - }, - { - "mutability": "Mut", - "span": 52 - }, - { - "mutability": "Mut", - "span": 57 - }, - { - "mutability": "Mut", - "span": 56 - }, - { - "mutability": "Mut", - "span": 56 - }, - { - "mutability": "Mut", - "span": 56 - }, - { - "mutability": "Mut", - "span": 62 - }, - { - "mutability": "Mut", - "span": 61 - }, - { - "mutability": "Mut", - "span": 61 - }, - { - "mutability": "Mut", - "span": 61 - }, - { - "mutability": "Mut", - "span": 67 - }, - { - "mutability": "Mut", - "span": 66 - }, - { - "mutability": "Mut", - "span": 66 - }, - { - "mutability": "Mut", - "span": 66 - }, - { - "mutability": "Mut", - "span": 72 - }, - { - "mutability": "Mut", - "span": 71 - }, - { - "mutability": "Mut", - "span": 71 - }, - { - "mutability": "Mut", - "span": 71 - }, - { - "mutability": "Mut", - "span": 75 - } - ], - "span": 77, - "spread_arg": null, - "var_debug_info": [] - }, - "id": 6, - "name": "main" - } - }, - "symbol_name": "_ZN7shl_min4main17h" - }, - { - "details": null, - "mono_item_kind": { - "MonoItemFn": { - "body": { - "arg_count": 1, - "blocks": [ - { - "statements": [], - "terminator": { - "kind": "Return", - "span": 44 - } - } - ], - "locals": [ - { - "mutability": "Mut", - "span": 44 - }, - { - "mutability": "Not", - "span": 44 - } - ], - "span": 44, - "spread_arg": null, - "var_debug_info": [] - }, - "id": 4, - "name": "std::ptr::drop_in_place::<{closure@std::rt::lang_start<()>::{closure#0}}>" - } - }, - "symbol_name": "_ZN4core3ptr85drop_in_place$LT$std..rt..lang_start$LT$$LP$$RP$$GT$..$u7b$$u7b$closure$u7d$$u7d$$GT$17h" - }, - { - "details": null, - "mono_item_kind": { - "MonoItemFn": { - "body": { - "arg_count": 1, - "blocks": [ - { - "statements": [], - "terminator": { - "kind": { - "Call": { - "args": [ + { + "kind": { + "Assign": [ { - "Move": { - "local": 1, - "projection": [] - } + "local": 7, + "projection": [] }, { - "Constant": { - "const_": { - "id": 4, - "kind": "ZeroSized" + "BinaryOp": [ + "Lt", + { + "Move": { + "local": 6, + "projection": [] + } }, - "span": 32, - "user_ty": null - } + { + "Constant": { + "const_": { + "kind": { + "Allocated": { + "align": 4, + "bytes": [ + 16, + 0, + 0, + 0 + ], + "mutability": "Mut", + "provenance": { + "ptrs": [] + } + } + } + }, + "user_ty": null + } + } + ] + } + ] + } + } + ], + "terminator": { + "kind": { + "Assert": { + "cond": { + "Move": { + "local": 7, + "projection": [] } - ], - "destination": { - "local": 0, - "projection": [] }, - "func": { - "Constant": { - "const_": { - "id": 3, - "kind": "ZeroSized" + "expected": true, + "msg": { + "Overflow": [ + "Shl", + { + "Constant": { + "const_": { + "kind": { + "Allocated": { + "align": 2, + "bytes": [ + 0, + 128 + ], + "mutability": "Mut", + "provenance": { + "ptrs": [] + } + } + } + }, + "user_ty": null + } }, - "span": 31, - "user_ty": null - } + { + "Constant": { + "const_": { + "kind": { + "Allocated": { + "align": 4, + "bytes": [ + 1, + 0, + 0, + 0 + ], + "mutability": "Mut", + "provenance": { + "ptrs": [] + } + } + } + }, + "user_ty": null + } + } + ] }, - "target": 1, + "target": 4, "unwind": "Continue" } - }, - "span": 33 + } } }, { @@ -2178,1201 +1778,1209 @@ { "Constant": { "const_": { - "id": 4, - "kind": "ZeroSized" + "kind": { + "Allocated": { + "align": 8, + "bytes": [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 35, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "mutability": "Mut", + "provenance": { + "ptrs": [ + [ + 0, + 0 + ] + ] + } + } + } }, - "span": 32, "user_ty": null } } ], "destination": { - "local": 2, + "local": 4, "projection": [] }, "func": { "Constant": { "const_": { - "id": 5, "kind": "ZeroSized" }, - "span": 34, "user_ty": null } }, - "target": 2, - "unwind": "Unreachable" + "target": null, + "unwind": "Continue" } - }, - "span": 35 - } - }, - { - "statements": [], - "terminator": { - "kind": "Return", - "span": 36 - } - } - ], - "locals": [ - { - "mutability": "Mut", - "span": 37 - }, - { - "mutability": "Not", - "span": 38 - }, - { - "mutability": "Not", - "span": 39 - } - ], - "span": 42, - "spread_arg": null, - "var_debug_info": [ - { - "argument_index": 1, - "composite": null, - "name": "f", - "source_info": { - "scope": 0, - "span": 38 - }, - "value": { - "Place": { - "local": 1, - "projection": [] - } - } - }, - { - "argument_index": null, - "composite": null, - "name": "result", - "source_info": { - "scope": 1, - "span": 40 - }, - "value": { - "Place": { - "local": 0, - "projection": [] } } }, { - "argument_index": 1, - "composite": null, - "name": "dummy", - "source_info": { - "scope": 2, - "span": 41 - }, - "value": { - "Const": { - "const_": { - "id": 4, - "kind": "ZeroSized" - }, - "span": 32, - "user_ty": null + "statements": [ + { + "kind": { + "Assign": [ + { + "local": 5, + "projection": [] + }, + { + "BinaryOp": [ + "Shl", + { + "Constant": { + "const_": { + "kind": { + "Allocated": { + "align": 2, + "bytes": [ + 0, + 128 + ], + "mutability": "Mut", + "provenance": { + "ptrs": [] + } + } + } + }, + "user_ty": null + } + }, + { + "Constant": { + "const_": { + "kind": { + "Allocated": { + "align": 4, + "bytes": [ + 1, + 0, + 0, + 0 + ], + "mutability": "Mut", + "provenance": { + "ptrs": [] + } + } + } + }, + "user_ty": null + } + } + ] + } + ] + } } - } - } - ] - }, - "id": 2, - "name": "std::sys::backtrace::__rust_begin_short_backtrace::" - } - }, - "symbol_name": "_ZN3std3sys9backtrace28__rust_begin_short_backtrace17h" - }, - { - "details": null, - "mono_item_kind": { - "MonoItemFn": { - "body": { - "arg_count": 1, - "blocks": [ + ], + "terminator": { + "kind": { + "SwitchInt": { + "discr": { + "Move": { + "local": 5, + "projection": [] + } + }, + "targets": { + "branches": [ + [ + 0, + 5 + ] + ], + "otherwise": 6 + } + } + } + } + }, { "statements": [ { "kind": { "Assign": [ { - "local": 0, + "local": 10, "projection": [] }, { - "Use": { - "Constant": { - "const_": { - "id": 8, - "kind": { - "Allocated": { - "align": 1, - "bytes": [ - 0 - ], - "mutability": "Mut", - "provenance": { - "ptrs": [] + "Cast": [ + "IntToInt", + { + "Constant": { + "const_": { + "kind": { + "Allocated": { + "align": 4, + "bytes": [ + 1, + 0, + 0, + 0 + ], + "mutability": "Mut", + "provenance": { + "ptrs": [] + } } } - } - }, - "span": 46, - "user_ty": null - } - } + }, + "user_ty": null + } + }, + 0 + ] } ] - }, - "span": 46 - } - ], - "terminator": { - "kind": "Return", - "span": 45 - } - } - ], - "locals": [ - { - "mutability": "Mut", - "span": 47 - }, - { - "mutability": "Not", - "span": 48 - } - ], - "span": 49, - "spread_arg": null, - "var_debug_info": [ - { - "argument_index": 1, - "composite": null, - "name": "self", - "source_info": { - "scope": 0, - "span": 48 - }, - "value": { - "Const": { - "const_": { - "id": 4, - "kind": "ZeroSized" - }, - "span": 32, - "user_ty": null - } - } - } - ] - }, - "id": 5, - "name": "<() as std::process::Termination>::report" - } - }, - "symbol_name": "_ZN54_$LT$$LP$$RP$$u20$as$u20$std..process..Termination$GT$6report17h" - }, - { - "details": null, - "mono_item_kind": { - "MonoItemFn": { - "body": { - "arg_count": 1, - "blocks": [ - { - "statements": [ - { - "kind": { - "StorageLive": 2 - }, - "span": 16 - }, - { - "kind": { - "StorageLive": 3 - }, - "span": 15 - }, - { - "kind": { - "StorageLive": 4 - }, - "span": 17 + } }, { "kind": { "Assign": [ { - "local": 4, + "local": 11, "projection": [] }, { - "Use": { - "Copy": { - "local": 1, - "projection": [ - "Deref", - { - "Field": [ - 0, - 7 - ] - } - ] + "BinaryOp": [ + "Lt", + { + "Move": { + "local": 10, + "projection": [] + } + }, + { + "Constant": { + "const_": { + "kind": { + "Allocated": { + "align": 4, + "bytes": [ + 32, + 0, + 0, + 0 + ], + "mutability": "Mut", + "provenance": { + "ptrs": [] + } + } + } + }, + "user_ty": null + } } - } + ] } ] - }, - "span": 17 + } } ], "terminator": { "kind": { - "Call": { - "args": [ - { - "Move": { - "local": 4, - "projection": [] - } + "Assert": { + "cond": { + "Move": { + "local": 11, + "projection": [] } - ], - "destination": { - "local": 3, - "projection": [] }, - "func": { - "Constant": { - "const_": { - "id": 1, - "kind": "ZeroSized" + "expected": true, + "msg": { + "Overflow": [ + "Shl", + { + "Constant": { + "const_": { + "kind": { + "Allocated": { + "align": 4, + "bytes": [ + 0, + 0, + 0, + 128 + ], + "mutability": "Mut", + "provenance": { + "ptrs": [] + } + } + } + }, + "user_ty": null + } }, - "span": 14, - "user_ty": null - } + { + "Constant": { + "const_": { + "kind": { + "Allocated": { + "align": 4, + "bytes": [ + 1, + 0, + 0, + 0 + ], + "mutability": "Mut", + "provenance": { + "ptrs": [] + } + } + } + }, + "user_ty": null + } + } + ] }, - "target": 1, + "target": 7, "unwind": "Continue" } - }, - "span": 15 + } } }, { - "statements": [ - { - "kind": { - "StorageDead": 4 - }, - "span": 19 - } - ], + "statements": [], "terminator": { "kind": { "Call": { "args": [ { - "Move": { - "local": 3, - "projection": [] + "Constant": { + "const_": { + "kind": { + "Allocated": { + "align": 8, + "bytes": [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 38, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "mutability": "Mut", + "provenance": { + "ptrs": [ + [ + 0, + 1 + ] + ] + } + } + } + }, + "user_ty": null } } ], "destination": { - "local": 2, + "local": 8, "projection": [] }, "func": { "Constant": { "const_": { - "id": 2, "kind": "ZeroSized" }, - "span": 18, "user_ty": null } }, - "target": 2, + "target": null, "unwind": "Continue" } - }, - "span": 16 + } } }, { "statements": [ - { - "kind": { - "StorageDead": 3 - }, - "span": 21 - }, - { - "kind": { - "StorageLive": 5 - }, - "span": 22 - }, { "kind": { "Assign": [ { - "local": 5, + "local": 9, "projection": [] }, { - "Ref": [ + "BinaryOp": [ + "Shl", { - "kind": "ReErased" + "Constant": { + "const_": { + "kind": { + "Allocated": { + "align": 4, + "bytes": [ + 0, + 0, + 0, + 128 + ], + "mutability": "Mut", + "provenance": { + "ptrs": [] + } + } + } + }, + "user_ty": null + } }, - "Shared", { - "local": 2, - "projection": [ - { - "Field": [ - 0, - 15 - ] - } - ] + "Constant": { + "const_": { + "kind": { + "Allocated": { + "align": 4, + "bytes": [ + 1, + 0, + 0, + 0 + ], + "mutability": "Mut", + "provenance": { + "ptrs": [] + } + } + } + }, + "user_ty": null + } } ] } ] - }, - "span": 22 - }, - { - "kind": { - "StorageLive": 6 - }, - "span": 23 - }, + } + } + ], + "terminator": { + "kind": { + "SwitchInt": { + "discr": { + "Move": { + "local": 9, + "projection": [] + } + }, + "targets": { + "branches": [ + [ + 0, + 8 + ] + ], + "otherwise": 9 + } + } + } + } + }, + { + "statements": [ { "kind": { "Assign": [ { - "local": 6, + "local": 14, "projection": [] }, { - "Use": { - "Copy": { - "local": 2, - "projection": [ - { - "Field": [ - 0, - 15 - ] + "Cast": [ + "IntToInt", + { + "Constant": { + "const_": { + "kind": { + "Allocated": { + "align": 4, + "bytes": [ + 1, + 0, + 0, + 0 + ], + "mutability": "Mut", + "provenance": { + "ptrs": [] + } + } + } }, - { - "Field": [ - 0, - 9 - ] - } - ] - } - } + "user_ty": null + } + }, + 0 + ] } ] - }, - "span": 23 + } }, { "kind": { "Assign": [ { - "local": 0, + "local": 15, "projection": [] }, { - "Cast": [ - "IntToInt", + "BinaryOp": [ + "Lt", { "Move": { - "local": 6, + "local": 14, "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": [ - { - "mutability": "Mut", - "span": 28 - }, - { - "mutability": "Mut", - "span": 3 - }, - { - "mutability": "Mut", - "span": 16 - }, - { - "mutability": "Mut", - "span": 15 - }, - { - "mutability": "Mut", - "span": 17 - }, - { - "mutability": "Mut", - "span": 22 - }, - { - "mutability": "Mut", - "span": 23 - } - ], - "span": 3, - "spread_arg": null, - "var_debug_info": [ - { - "argument_index": null, - "composite": null, - "name": "main", - "source_info": { - "scope": 0, - "span": 9 - }, - "value": { - "Place": { - "local": 1, - "projection": [ - "Deref", - { - "Field": [ - 0, - 7 - ] - } - ] + { + "Constant": { + "const_": { + "kind": { + "Allocated": { + "align": 4, + "bytes": [ + 64, + 0, + 0, + 0 + ], + "mutability": "Mut", + "provenance": { + "ptrs": [] + } + } + } + }, + "user_ty": null + } + } + ] + } + ] + } } - } - }, - { - "argument_index": 1, - "composite": null, - "name": "self", - "source_info": { - "scope": 1, - "span": 29 - }, - "value": { - "Place": { - "local": 2, - "projection": [] + ], + "terminator": { + "kind": { + "Assert": { + "cond": { + "Move": { + "local": 15, + "projection": [] + } + }, + "expected": true, + "msg": { + "Overflow": [ + "Shl", + { + "Constant": { + "const_": { + "kind": { + "Allocated": { + "align": 8, + "bytes": [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 128 + ], + "mutability": "Mut", + "provenance": { + "ptrs": [] + } + } + } + }, + "user_ty": null + } + }, + { + "Constant": { + "const_": { + "kind": { + "Allocated": { + "align": 4, + "bytes": [ + 1, + 0, + 0, + 0 + ], + "mutability": "Mut", + "provenance": { + "ptrs": [] + } + } + } + }, + "user_ty": null + } + } + ] + }, + "target": 10, + "unwind": "Continue" + } } } }, - { - "argument_index": 1, - "composite": null, - "name": "self", - "source_info": { - "scope": 2, - "span": 30 - }, - "value": { - "Place": { - "local": 5, - "projection": [] - } - } - } - ] - }, - "id": 1, - "name": "std::rt::lang_start::<()>::{closure#0}" - } - }, - "symbol_name": "_ZN3std2rt10lang_start28_$u7b$$u7b$closure$u7d$$u7d$17h" - }, - { - "details": null, - "mono_item_kind": { - "MonoItemFn": { - "body": { - "arg_count": 2, - "blocks": [ { "statements": [], "terminator": { "kind": { "Call": { - "args": [], + "args": [ + { + "Constant": { + "const_": { + "kind": { + "Allocated": { + "align": 8, + "bytes": [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 43, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "mutability": "Mut", + "provenance": { + "ptrs": [ + [ + 0, + 2 + ] + ] + } + } + } + }, + "user_ty": null + } + } + ], "destination": { - "local": 0, + "local": 12, "projection": [] }, "func": { - "Move": { - "local": 1, - "projection": [] + "Constant": { + "const_": { + "kind": "ZeroSized" + }, + "user_ty": null } }, - "target": 1, + "target": null, "unwind": "Continue" } - }, - "span": 43 - } - }, - { - "statements": [], - "terminator": { - "kind": "Return", - "span": 43 + } } - } - ], - "locals": [ - { - "mutability": "Mut", - "span": 43 - }, - { - "mutability": "Not", - "span": 43 }, { - "mutability": "Not", - "span": 43 - } - ], - "span": 43, - "spread_arg": 2, - "var_debug_info": [] - }, - "id": 3, - "name": ">::call_once" - } - }, - "symbol_name": "_ZN4core3ops8function6FnOnce9call_once17h" - }, - { - "details": null, - "mono_item_kind": { - "MonoItemFn": { - "body": { - "arg_count": 2, - "blocks": [ - { - "statements": [], + "statements": [ + { + "kind": { + "Assign": [ + { + "local": 13, + "projection": [] + }, + { + "BinaryOp": [ + "Shl", + { + "Constant": { + "const_": { + "kind": { + "Allocated": { + "align": 8, + "bytes": [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 128 + ], + "mutability": "Mut", + "provenance": { + "ptrs": [] + } + } + } + }, + "user_ty": null + } + }, + { + "Constant": { + "const_": { + "kind": { + "Allocated": { + "align": 4, + "bytes": [ + 1, + 0, + 0, + 0 + ], + "mutability": "Mut", + "provenance": { + "ptrs": [] + } + } + } + }, + "user_ty": null + } + } + ] + } + ] + } + } + ], "terminator": { "kind": { - "Call": { - "args": [ - { - "Move": { - "local": 1, - "projection": [ - "Deref" - ] - } - }, - { - "Move": { - "local": 2, - "projection": [] - } - } - ], - "destination": { - "local": 0, - "projection": [] - }, - "func": { - "Constant": { - "const_": { - "id": 6, - "kind": "ZeroSized" - }, - "span": 43, - "user_ty": null + "SwitchInt": { + "discr": { + "Move": { + "local": 13, + "projection": [] } }, - "target": 1, - "unwind": "Continue" + "targets": { + "branches": [ + [ + 0, + 11 + ] + ], + "otherwise": 12 + } } - }, - "span": 43 - } - }, - { - "statements": [], - "terminator": { - "kind": "Return", - "span": 43 + } } - } - ], - "locals": [ - { - "mutability": "Mut", - "span": 43 - }, - { - "mutability": "Not", - "span": 43 }, - { - "mutability": "Not", - "span": 43 - } - ], - "span": 43, - "spread_arg": 2, - "var_debug_info": [] - }, - "id": 3, - "name": "<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once" - } - }, - "symbol_name": "_ZN4core3ops8function6FnOnce40call_once$u7b$$u7b$vtable.shim$u7d$$u7d$17h" - }, - { - "details": null, - "mono_item_kind": { - "MonoItemFn": { - "body": { - "arg_count": 2, - "blocks": [ { "statements": [ { "kind": { "Assign": [ { - "local": 3, + "local": 18, "projection": [] }, { - "Ref": [ + "Cast": [ + "IntToInt", { - "kind": "ReErased" + "Constant": { + "const_": { + "kind": { + "Allocated": { + "align": 4, + "bytes": [ + 1, + 0, + 0, + 0 + ], + "mutability": "Mut", + "provenance": { + "ptrs": [] + } + } + } + }, + "user_ty": null + } }, + 0 + ] + } + ] + } + }, + { + "kind": { + "Assign": [ + { + "local": 19, + "projection": [] + }, + { + "BinaryOp": [ + "Lt", { - "Mut": { - "kind": "Default" + "Move": { + "local": 18, + "projection": [] } }, { - "local": 1, - "projection": [] + "Constant": { + "const_": { + "kind": { + "Allocated": { + "align": 4, + "bytes": [ + 128, + 0, + 0, + 0 + ], + "mutability": "Mut", + "provenance": { + "ptrs": [] + } + } + } + }, + "user_ty": null + } } ] } ] - }, - "span": 43 + } } ], + "terminator": { + "kind": { + "Assert": { + "cond": { + "Move": { + "local": 19, + "projection": [] + } + }, + "expected": true, + "msg": { + "Overflow": [ + "Shl", + { + "Constant": { + "const_": { + "kind": { + "Allocated": { + "align": 16, + "bytes": [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 128 + ], + "mutability": "Mut", + "provenance": { + "ptrs": [] + } + } + } + }, + "user_ty": null + } + }, + { + "Constant": { + "const_": { + "kind": { + "Allocated": { + "align": 4, + "bytes": [ + 1, + 0, + 0, + 0 + ], + "mutability": "Mut", + "provenance": { + "ptrs": [] + } + } + } + }, + "user_ty": null + } + } + ] + }, + "target": 13, + "unwind": "Continue" + } + } + } + }, + { + "statements": [], "terminator": { "kind": { "Call": { "args": [ { - "Move": { - "local": 3, - "projection": [] - } - }, - { - "Move": { - "local": 2, - "projection": [] + "Constant": { + "const_": { + "kind": { + "Allocated": { + "align": 8, + "bytes": [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 52, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "mutability": "Mut", + "provenance": { + "ptrs": [ + [ + 0, + 3 + ] + ] + } + } + } + }, + "user_ty": null } } ], "destination": { - "local": 0, + "local": 16, "projection": [] }, "func": { "Constant": { "const_": { - "id": 7, "kind": "ZeroSized" }, - "span": 43, "user_ty": null } }, - "target": 1, - "unwind": { - "Cleanup": 3 - } - } - }, - "span": 43 - } - }, - { - "statements": [], - "terminator": { - "kind": { - "Drop": { - "place": { - "local": 1, - "projection": [] - }, - "target": 2, + "target": null, "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": [ - { - "mutability": "Mut", - "span": 43 - }, - { - "mutability": "Not", - "span": 43 - }, - { - "mutability": "Not", - "span": 43 }, - { - "mutability": "Not", - "span": 43 - } - ], - "span": 43, - "spread_arg": 2, - "var_debug_info": [] - }, - "id": 3, - "name": "<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once" - } - }, - "symbol_name": "_ZN4core3ops8function6FnOnce9call_once17h" - }, - { - "details": null, - "mono_item_kind": { - "MonoItemFn": { - "body": { - "arg_count": 4, - "blocks": [ { "statements": [ - { - "kind": { - "StorageLive": 5 - }, - "span": 1 - }, - { - "kind": { - "StorageLive": 6 - }, - "span": 2 - }, - { - "kind": { - "StorageLive": 8 - }, - "span": 3 - }, { "kind": { "Assign": [ { - "local": 8, + "local": 17, "projection": [] }, { - "Aggregate": [ + "BinaryOp": [ + "Shl", { - "Closure": [ - 1, - [ - { - "Type": 1 - }, - { - "Type": 2 - }, - { - "Type": 3 - }, - { - "Type": 4 + "Constant": { + "const_": { + "kind": { + "Allocated": { + "align": 16, + "bytes": [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 128 + ], + "mutability": "Mut", + "provenance": { + "ptrs": [] + } + } } - ] - ] - }, - [ - { - "Copy": { - "local": 1, - "projection": [] - } + }, + "user_ty": null } - ] - ] - } - ] - }, - "span": 3 - }, - { - "kind": { - "Assign": [ - { - "local": 7, - "projection": [] - }, - { - "Ref": [ - { - "kind": "ReErased" }, - "Shared", { - "local": 8, - "projection": [] + "Constant": { + "const_": { + "kind": { + "Allocated": { + "align": 4, + "bytes": [ + 1, + 0, + 0, + 0 + ], + "mutability": "Mut", + "provenance": { + "ptrs": [] + } + } + } + }, + "user_ty": null + } } ] } ] - }, - "span": 2 - }, - { - "kind": { - "Assign": [ - { - "local": 6, + } + } + ], + "terminator": { + "kind": { + "SwitchInt": { + "discr": { + "Move": { + "local": 17, "projection": [] - }, + } + }, + "targets": { + "branches": [ + [ + 0, + 14 + ] + ], + "otherwise": 15 + } + } + } + } + }, + { + "statements": [], + "terminator": { + "kind": "Return" + } + }, + { + "statements": [], + "terminator": { + "kind": { + "Call": { + "args": [ { - "Cast": [ - { - "PointerCoercion": "Unsize" - }, - { - "Copy": { - "local": 7, - "projection": [] + "Constant": { + "const_": { + "kind": { + "Allocated": { + "align": 8, + "bytes": [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 73, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "mutability": "Mut", + "provenance": { + "ptrs": [ + [ + 0, + 4 + ] + ] + } + } } }, - 5 - ] - } - ] - }, - "span": 2 - } - ], - "terminator": { - "kind": { - "Call": { - "args": [ - { - "Move": { - "local": 6, - "projection": [] - } - }, - { - "Move": { - "local": 2, - "projection": [] - } - }, - { - "Move": { - "local": 3, - "projection": [] - } - }, - { - "Move": { - "local": 4, - "projection": [] + "user_ty": null } } ], "destination": { - "local": 5, + "local": 20, "projection": [] }, "func": { "Constant": { "const_": { - "id": 0, "kind": "ZeroSized" }, - "span": 0, "user_ty": null } }, - "target": 1, + "target": null, "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": [ { - "mutability": "Mut", - "span": 8 + "mutability": "Mut" }, { - "mutability": "Not", - "span": 9 + "mutability": "Mut" }, { - "mutability": "Not", - "span": 10 + "mutability": "Mut" }, { - "mutability": "Not", - "span": 11 + "mutability": "Mut" }, { - "mutability": "Not", - "span": 12 + "mutability": "Mut" }, { - "mutability": "Mut", - "span": 1 + "mutability": "Mut" }, { - "mutability": "Mut", - "span": 2 + "mutability": "Mut" }, { - "mutability": "Not", - "span": 2 + "mutability": "Mut" }, { - "mutability": "Not", - "span": 3 - } - ], - "span": 13, - "spread_arg": null, - "var_debug_info": [ + "mutability": "Mut" + }, { - "argument_index": 1, - "composite": null, - "name": "main", - "source_info": { - "scope": 0, - "span": 9 - }, - "value": { - "Place": { - "local": 1, - "projection": [] - } - } + "mutability": "Mut" }, { - "argument_index": 2, - "composite": null, - "name": "argc", - "source_info": { - "scope": 0, - "span": 10 - }, - "value": { - "Place": { - "local": 2, - "projection": [] - } - } + "mutability": "Mut" }, { - "argument_index": 3, - "composite": null, - "name": "argv", - "source_info": { - "scope": 0, - "span": 11 - }, - "value": { - "Place": { - "local": 3, - "projection": [] - } - } + "mutability": "Mut" }, { - "argument_index": 4, - "composite": null, - "name": "sigpipe", - "source_info": { - "scope": 0, - "span": 12 - }, - "value": { - "Place": { - "local": 4, - "projection": [] - } - } + "mutability": "Mut" }, { - "argument_index": null, - "composite": null, - "name": "v", - "source_info": { - "scope": 1, - "span": 6 - }, - "value": { - "Place": { - "local": 0, - "projection": [] - } - } + "mutability": "Mut" + }, + { + "mutability": "Mut" + }, + { + "mutability": "Mut" + }, + { + "mutability": "Mut" + }, + { + "mutability": "Mut" + }, + { + "mutability": "Mut" + }, + { + "mutability": "Mut" + }, + { + "mutability": "Mut" } - ] + ], + "spread_arg": null, + "var_debug_info": [] }, - "id": 0, - "name": "std::rt::lang_start::<()>" + "name": "main" } }, - "symbol_name": "_ZN3std2rt10lang_start17h" + "symbol_name": "_ZN7shl_min4main17h" } ], "types": [ @@ -3442,54 +3050,6 @@ } } ], - [ - { - "EnumType": { - "discriminants": [ - 0, - 1 - ], - "fields": "elided", - "layout": { - "abi": { - "Scalar": { - "Initialized": { - "valid_range": { - "end": 18446744073709551615, - "start": 0 - }, - "value": { - "Int": { - "length": "I64", - "signed": true - } - } - } - } - }, - "abi_align": 8, - "fields": { - "Arbitrary": { - "offsets": [ - { - "num_bits": 0 - } - ] - } - }, - "size": { - "num_bits": 64 - }, - "variants": { - "Single": { - "index": 0 - } - } - }, - "name": "std::result::Result" - } - } - ], [ { "StructType": { @@ -3843,39 +3403,6 @@ } } ], - [ - { - "RefType": { - "layout": { - "abi": { - "Scalar": { - "Initialized": { - "valid_range": { - "end": 18446744073709551615, - "start": 1 - }, - "value": { - "Pointer": 0 - } - } - } - }, - "abi_align": 8, - "fields": "Primitive", - "size": { - "num_bits": 64 - }, - "variants": { - "Single": { - "index": 0 - } - } - }, - "mutability": "Not", - "pointee_type": "elided" - } - } - ], [ { "RefType": { diff --git a/tests/integration/programs/slice.smir.json.expected b/tests/integration/expected/nightly-2025-03-01/slice.smir.json.expected similarity index 83% rename from tests/integration/programs/slice.smir.json.expected rename to tests/integration/expected/nightly-2025-03-01/slice.smir.json.expected index ee6c4084..3f7098db 100644 --- a/tests/integration/programs/slice.smir.json.expected +++ b/tests/integration/expected/nightly-2025-03-01/slice.smir.json.expected @@ -162,363 +162,348 @@ "mono_item_kind": { "MonoItemFn": { "body": { - "arg_count": 0, + "arg_count": 2, "blocks": [ { "statements": [ + { + "kind": { + "StorageLive": 5 + } + }, { "kind": { "Assign": [ { - "local": 1, + "local": 6, "projection": [] }, { - "Aggregate": [ - { - "Array": 27 - }, - [ - { - "Constant": { - "const_": { - "id": 22, - "kind": { - "Allocated": { - "align": 4, - "bytes": [ - 1, - 0, - 0, - 0 - ], - "mutability": "Mut", - "provenance": { - "ptrs": [] - } - } - } - }, - "span": 163, - "user_ty": null - } - }, - { - "Constant": { - "const_": { - "id": 23, - "kind": { - "Allocated": { - "align": 4, - "bytes": [ - 2, - 0, - 0, - 0 - ], - "mutability": "Mut", - "provenance": { - "ptrs": [] - } - } - } - }, - "span": 164, - "user_ty": null - } - }, - { - "Constant": { - "const_": { - "id": 24, - "kind": { - "Allocated": { - "align": 4, - "bytes": [ - 3, - 0, - 0, - 0 - ], - "mutability": "Mut", - "provenance": { - "ptrs": [] - } - } - } - }, - "span": 165, - "user_ty": null - } - }, - { - "Constant": { - "const_": { - "id": 25, - "kind": { - "Allocated": { - "align": 4, - "bytes": [ - 4, - 0, - 0, - 0 - ], - "mutability": "Mut", - "provenance": { - "ptrs": [] - } - } - } - }, - "span": 166, - "user_ty": null + "Use": { + "Copy": { + "local": 1, + "projection": [ + { + "Field": [ + 1, + 0 + ] } - } - ] - ] + ] + } + } } ] - }, - "span": 167 + } }, { "kind": { "Assign": [ { - "local": 4, + "local": 7, "projection": [] }, { - "Ref": [ - { - "kind": "ReErased" - }, - "Shared", - { + "Use": { + "Copy": { "local": 1, - "projection": [] + "projection": [ + { + "Field": [ + 0, + 0 + ] + } + ] } - ] + } } ] - }, - "span": 168 + } + }, + { + "kind": { + "StorageLive": 13 + } }, { "kind": { "Assign": [ { - "local": 5, + "local": 13, "projection": [] }, { - "Aggregate": [ + "BinaryOp": [ + "Lt", { - "Adt": [ - 15, - 0, - [ - { - "Type": 0 - } - ], - null, - null - ] + "Copy": { + "local": 6, + "projection": [] + } }, - [ - { - "Constant": { - "const_": { - "id": 26, - "kind": { - "Allocated": { - "align": 8, - "bytes": [ - 1, - 0, - 0, - 0, - 0, - 0, - 0, - 0 - ], - "mutability": "Mut", - "provenance": { - "ptrs": [] - } - } - } - }, - "span": 169, - "user_ty": null - } - }, - { - "Constant": { - "const_": { - "id": 27, - "kind": { - "Allocated": { - "align": 8, - "bytes": [ - 3, - 0, - 0, - 0, - 0, - 0, - 0, - 0 - ], - "mutability": "Mut", - "provenance": { - "ptrs": [] - } - } - } - }, - "span": 170, - "user_ty": null - } + { + "Copy": { + "local": 7, + "projection": [] } - ] + } ] } ] - }, - "span": 171 + } } ], + "terminator": { + "kind": { + "SwitchInt": { + "discr": { + "Move": { + "local": 13, + "projection": [] + } + }, + "targets": { + "branches": [ + [ + 0, + 4 + ] + ], + "otherwise": 3 + } + } + } + } + }, + { + "statements": [], "terminator": { "kind": { "Call": { "args": [ { "Move": { - "local": 4, + "local": 6, "projection": [] } }, { "Move": { - "local": 5, + "local": 9, "projection": [] } } ], "destination": { - "local": 3, + "local": 10, "projection": [] }, "func": { "Constant": { "const_": { - "id": 21, "kind": "ZeroSized" }, - "span": 162, "user_ty": null } }, - "target": 1, + "target": null, "unwind": "Continue" } - }, - "span": 162 + } } }, { "statements": [ + { + "kind": { + "StorageDead": 8 + } + }, + { + "kind": { + "StorageLive": 11 + } + }, + { + "kind": { + "StorageLive": 12 + } + }, { "kind": { "Assign": [ { - "local": 2, + "local": 12, "projection": [] }, { - "Use": { - "Copy": { - "local": 3, - "projection": [] + "AddressOf": [ + "Const", + { + "local": 2, + "projection": [ + "Deref" + ] } - } + ] } ] - }, - "span": 173 + } + }, + { + "kind": { + "StorageLive": 15 + } + }, + { + "kind": { + "StorageLive": 16 + } }, { "kind": { "Assign": [ { - "local": 7, + "local": 16, "projection": [] }, { - "Ref": [ + "Cast": [ + "PtrToPtr", { - "kind": "ReErased" + "Copy": { + "local": 12, + "projection": [] + } }, - "Shared", + 0 + ] + } + ] + } + }, + { + "kind": { + "Assign": [ + { + "local": 15, + "projection": [] + }, + { + "BinaryOp": [ + "Offset", { - "local": 2, - "projection": [] + "Copy": { + "local": 16, + "projection": [] + } + }, + { + "Copy": { + "local": 7, + "projection": [] + } } ] } ] - }, - "span": 174 + } + }, + { + "kind": { + "StorageDead": 16 + } }, { "kind": { "Assign": [ { - "local": 8, + "local": 11, "projection": [] }, { - "Use": { - "Constant": { - "const_": { - "id": 29, - "kind": { - "Allocated": { - "align": 8, - "bytes": [ - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0 - ], - "mutability": "Mut", - "provenance": { - "ptrs": [ - [ - 0, - 0 - ] - ] - } - } + "Aggregate": [ + { + "RawPtr": [ + 3, + "Not" + ] + }, + [ + { + "Copy": { + "local": 15, + "projection": [] } }, - "span": 175, - "user_ty": null + { + "Copy": { + "local": 4, + "projection": [] + } + } + ] + ] + } + ] + } + }, + { + "kind": { + "StorageDead": 15 + } + }, + { + "kind": { + "StorageDead": 12 + } + }, + { + "kind": { + "Assign": [ + { + "local": 0, + "projection": [] + }, + { + "Ref": [ + { + "kind": "ReErased" + }, + "Shared", + { + "local": 11, + "projection": [ + "Deref" + ] } - } + ] } ] - }, - "span": 175 + } + }, + { + "kind": { + "StorageDead": 11 + } + } + ], + "terminator": { + "kind": "Return" + } + }, + { + "statements": [ + { + "kind": { + "StorageDead": 13 + } + }, + { + "kind": { + "StorageDead": 5 + } } ], "terminator": { @@ -533,186 +518,279 @@ }, { "Move": { - "local": 8, + "local": 6, "projection": [] } } ], "destination": { - "local": 6, + "local": 3, "projection": [] }, "func": { "Constant": { "const_": { - "id": 28, "kind": "ZeroSized" }, - "span": 172, "user_ty": null } }, - "target": 2, + "target": null, "unwind": "Continue" } - }, - "span": 172 + } } }, { - "statements": [], - "terminator": { - "kind": { - "SwitchInt": { - "discr": { - "Move": { - "local": 6, + "statements": [ + { + "kind": { + "StorageLive": 14 + } + }, + { + "kind": { + "Assign": [ + { + "local": 14, "projection": [] - } - }, - "targets": { - "branches": [ - [ - 0, - 4 + }, + { + "BinaryOp": [ + "SubUnchecked", + { + "Copy": { + "local": 6, + "projection": [] + } + }, + { + "Copy": { + "local": 7, + "projection": [] + } + } ] - ], - "otherwise": 3 - } + } + ] } }, - "span": 172 - } - }, - { - "statements": [], - "terminator": { - "kind": "Return", - "span": 176 - } - }, - { - "statements": [], - "terminator": { - "kind": { - "Call": { - "args": [ + { + "kind": { + "Assign": [ { - "Constant": { - "const_": { - "id": 31, - "kind": { - "Allocated": { - "align": 8, - "bytes": [ - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 29, - 0, - 0, - 0, - 0, - 0, + "local": 5, + "projection": [] + }, + { + "Aggregate": [ + { + "Adt": [ + 0, + 1, + [ + { + "Type": 0 + } + ], + null, + null + ] + }, + [ + { + "Move": { + "local": 14, + "projection": [] + } + } + ] + ] + } + ] + } + }, + { + "kind": { + "StorageDead": 14 + } + }, + { + "kind": { + "StorageDead": 13 + } + }, + { + "kind": { + "Assign": [ + { + "local": 4, + "projection": [] + }, + { + "Use": { + "Copy": { + "local": 5, + "projection": [ + { + "Downcast": 1 + }, + { + "Field": [ 0, 0 - ], - "mutability": "Mut", - "provenance": { - "ptrs": [ - [ - 0, - 1 - ] - ] - } + ] } + ] + } + } + } + ] + } + }, + { + "kind": { + "StorageDead": 5 + } + }, + { + "kind": { + "StorageLive": 8 + } + }, + { + "kind": { + "Assign": [ + { + "local": 9, + "projection": [] + }, + { + "UnaryOp": [ + "PtrMetadata", + { + "Copy": { + "local": 2, + "projection": [] + } + } + ] + } + ] + } + }, + { + "kind": { + "Assign": [ + { + "local": 8, + "projection": [] + }, + { + "BinaryOp": [ + "Gt", + { + "Copy": { + "local": 6, + "projection": [] } }, - "span": 74, - "user_ty": null - } + { + "Copy": { + "local": 9, + "projection": [] + } + } + ] } - ], - "destination": { - "local": 9, - "projection": [] - }, - "func": { - "Constant": { - "const_": { - "id": 30, - "kind": "ZeroSized" - }, - "span": 177, - "user_ty": null + ] + } + } + ], + "terminator": { + "kind": { + "SwitchInt": { + "discr": { + "Move": { + "local": 8, + "projection": [] } }, - "target": null, - "unwind": "Continue" + "targets": { + "branches": [ + [ + 0, + 2 + ] + ], + "otherwise": 1 + } } - }, - "span": 177 + } } } ], "locals": [ { - "mutability": "Mut", - "span": 178 + "mutability": "Mut" }, { - "mutability": "Not", - "span": 179 + "mutability": "Not" }, { - "mutability": "Not", - "span": 180 + "mutability": "Not" }, { - "mutability": "Not", - "span": 162 + "mutability": "Mut" }, { - "mutability": "Mut", - "span": 168 + "mutability": "Not" }, { - "mutability": "Mut", - "span": 171 + "mutability": "Mut" }, { - "mutability": "Mut", - "span": 172 + "mutability": "Mut" }, { - "mutability": "Mut", - "span": 174 + "mutability": "Mut" }, { - "mutability": "Mut", - "span": 175 + "mutability": "Mut" }, { - "mutability": "Mut", - "span": 177 + "mutability": "Mut" + }, + { + "mutability": "Not" + }, + { + "mutability": "Not" + }, + { + "mutability": "Mut" + }, + { + "mutability": "Mut" + }, + { + "mutability": "Mut" + }, + { + "mutability": "Not" + }, + { + "mutability": "Not" } ], - "span": 181, "spread_arg": null, "var_debug_info": [ { - "argument_index": null, + "argument_index": 1, "composite": null, - "name": "a", + "name": "self", "source_info": { - "scope": 1, - "span": 179 + "scope": 0 }, "value": { "Place": { @@ -722,12 +800,11 @@ } }, { - "argument_index": null, + "argument_index": 2, "composite": null, - "name": "b", + "name": "slice", "source_info": { - "scope": 2, - "span": 180 + "scope": 0 }, "value": { "Place": { @@ -735,458 +812,177 @@ "projection": [] } } - } - ] - }, - "id": 14, - "name": "main" - } - }, - "symbol_name": "_ZN5slice4main17h" - }, - { - "details": null, - "mono_item_kind": { - "MonoItemFn": { - "body": { - "arg_count": 1, - "blocks": [ + }, { - "statements": [], - "terminator": { - "kind": "Return", - "span": 86 + "argument_index": null, + "composite": null, + "name": "new_len", + "source_info": { + "scope": 1 + }, + "value": { + "Place": { + "local": 4, + "projection": [] + } } - } - ], - "locals": [ - { - "mutability": "Mut", - "span": 86 }, { - "mutability": "Not", - "span": 86 - } - ], - "span": 86, - "spread_arg": null, - "var_debug_info": [] - }, - "id": 6, - "name": "std::ptr::drop_in_place::<{closure@std::rt::lang_start<()>::{closure#0}}>" - } - }, - "symbol_name": "_ZN4core3ptr85drop_in_place$LT$std..rt..lang_start$LT$$LP$$RP$$GT$..$u7b$$u7b$closure$u7d$$u7d$$GT$17h" - }, - { - "details": null, - "mono_item_kind": { - "MonoItemFn": { - "body": { - "arg_count": 1, - "blocks": [ - { - "statements": [], - "terminator": { - "kind": { - "Call": { - "args": [ - { - "Move": { - "local": 1, - "projection": [] - } - }, - { - "Constant": { - "const_": { - "id": 6, - "kind": "ZeroSized" - }, - "span": 74, - "user_ty": null - } - } - ], - "destination": { - "local": 0, - "projection": [] - }, - "func": { - "Constant": { - "const_": { - "id": 5, - "kind": "ZeroSized" - }, - "span": 73, - "user_ty": null - } - }, - "target": 1, - "unwind": "Continue" - } - }, - "span": 75 - } - }, - { - "statements": [], - "terminator": { - "kind": { - "Call": { - "args": [ - { - "Constant": { - "const_": { - "id": 6, - "kind": "ZeroSized" - }, - "span": 74, - "user_ty": null - } - } - ], - "destination": { - "local": 2, - "projection": [] - }, - "func": { - "Constant": { - "const_": { - "id": 7, - "kind": "ZeroSized" - }, - "span": 76, - "user_ty": null - } - }, - "target": 2, - "unwind": "Unreachable" - } - }, - "span": 77 + "argument_index": 1, + "composite": null, + "name": "self", + "source_info": { + "scope": 2 + }, + "value": { + "Place": { + "local": 6, + "projection": [] + } } }, { - "statements": [], - "terminator": { - "kind": "Return", - "span": 78 + "argument_index": 2, + "composite": null, + "name": "rhs", + "source_info": { + "scope": 2 + }, + "value": { + "Place": { + "local": 7, + "projection": [] + } } - } - ], - "locals": [ - { - "mutability": "Mut", - "span": 79 - }, - { - "mutability": "Not", - "span": 80 }, - { - "mutability": "Not", - "span": 81 - } - ], - "span": 84, - "spread_arg": null, - "var_debug_info": [ { "argument_index": 1, "composite": null, - "name": "f", + "name": "ptr", "source_info": { - "scope": 0, - "span": 80 + "scope": 3 }, "value": { "Place": { - "local": 1, + "local": 2, "projection": [] } } }, { - "argument_index": null, + "argument_index": 2, "composite": null, - "name": "result", + "name": "offset", "source_info": { - "scope": 1, - "span": 82 + "scope": 3 }, "value": { "Place": { - "local": 0, + "local": 7, "projection": [] } } }, { - "argument_index": 1, + "argument_index": 3, "composite": null, - "name": "dummy", + "name": "len", "source_info": { - "scope": 2, - "span": 83 + "scope": 3 }, "value": { - "Const": { - "const_": { - "id": 6, - "kind": "ZeroSized" - }, - "span": 74, - "user_ty": null - } - } - } - ] - }, - "id": 4, - "name": "std::sys::backtrace::__rust_begin_short_backtrace::" - } - }, - "symbol_name": "_ZN3std3sys9backtrace28__rust_begin_short_backtrace17h" - }, - { - "details": null, - "mono_item_kind": { - "MonoItemFn": { - "body": { - "arg_count": 1, - "blocks": [ - { - "statements": [ - { - "kind": { - "Assign": [ - { - "local": 0, - "projection": [] - }, - { - "Use": { - "Constant": { - "const_": { - "id": 19, - "kind": { - "Allocated": { - "align": 1, - "bytes": [ - 0 - ], - "mutability": "Mut", - "provenance": { - "ptrs": [] - } - } - } - }, - "span": 149, - "user_ty": null - } - } - } - ] - }, - "span": 149 + "Place": { + "local": 4, + "projection": [] } - ], - "terminator": { - "kind": "Return", - "span": 148 } - } - ], - "locals": [ - { - "mutability": "Mut", - "span": 150 }, - { - "mutability": "Not", - "span": 151 - } - ], - "span": 152, - "spread_arg": null, - "var_debug_info": [ { "argument_index": 1, "composite": null, - "name": "self", + "name": "ptr", "source_info": { - "scope": 0, - "span": 151 + "scope": 5 }, "value": { - "Const": { - "const_": { - "id": 6, - "kind": "ZeroSized" - }, - "span": 74, - "user_ty": null + "Place": { + "local": 2, + "projection": [] } } } ] }, - "id": 12, - "name": "<() as std::process::Termination>::report" + "name": " as std::slice::SliceIndex<[i32]>>::index" } }, - "symbol_name": "_ZN54_$LT$$LP$$RP$$u20$as$u20$std..process..Termination$GT$6report17h" + "symbol_name": "_ZN106_$LT$core..ops..range..Range$LT$usize$GT$$u20$as$u20$core..slice..index..SliceIndex$LT$$u5b$T$u5d$$GT$$GT$5index17h" }, { "details": null, "mono_item_kind": { "MonoItemFn": { "body": { - "arg_count": 1, + "arg_count": 4, "blocks": [ { "statements": [ { "kind": { - "StorageLive": 2 - }, - "span": 58 - }, - { - "kind": { - "StorageLive": 3 - }, - "span": 57 + "StorageLive": 5 + } }, { "kind": { - "StorageLive": 4 - }, - "span": 59 + "StorageLive": 7 + } }, { "kind": { "Assign": [ { - "local": 4, + "local": 7, "projection": [] }, { - "Use": { - "Copy": { - "local": 1, - "projection": [ - "Deref", - { - "Field": [ - 0, - 18 - ] - } + "Aggregate": [ + { + "Closure": [ + 0, + [ + { + "Type": 0 + }, + { + "Type": 0 + }, + { + "Type": 0 + }, + { + "Type": 0 + } + ] ] - } - } - } - ] - }, - "span": 59 - } - ], - "terminator": { - "kind": { - "Call": { - "args": [ - { - "Move": { - "local": 4, - "projection": [] - } - } - ], - "destination": { - "local": 3, - "projection": [] - }, - "func": { - "Constant": { - "const_": { - "id": 3, - "kind": "ZeroSized" - }, - "span": 56, - "user_ty": null - } - }, - "target": 1, - "unwind": "Continue" - } - }, - "span": 57 - } - }, - { - "statements": [ - { - "kind": { - "StorageDead": 4 - }, - "span": 61 - } - ], - "terminator": { - "kind": { - "Call": { - "args": [ - { - "Move": { - "local": 3, - "projection": [] - } - } - ], - "destination": { - "local": 2, - "projection": [] - }, - "func": { - "Constant": { - "const_": { - "id": 4, - "kind": "ZeroSized" - }, - "span": 60, - "user_ty": null + }, + [ + { + "Copy": { + "local": 1, + "projection": [] + } + } + ] + ] } - }, - "target": 2, - "unwind": "Continue" + ] } }, - "span": 58 - } - }, - { - "statements": [ - { - "kind": { - "StorageDead": 3 - }, - "span": 63 - }, - { - "kind": { - "StorageLive": 5 - }, - "span": 64 - }, { "kind": { "Assign": [ { - "local": 5, + "local": 6, "projection": [] }, { @@ -1196,171 +992,152 @@ }, "Shared", { - "local": 2, - "projection": [ - { - "Field": [ - 0, - 26 - ] - } - ] + "local": 7, + "projection": [] } ] } ] - }, - "span": 64 - }, - { - "kind": { - "StorageLive": 6 - }, - "span": 65 - }, - { - "kind": { - "Assign": [ - { - "local": 6, - "projection": [] - }, - { - "Use": { - "Copy": { - "local": 2, - "projection": [ - { - "Field": [ - 0, - 26 - ] - }, - { - "Field": [ - 0, - 20 - ] - } - ] - } - } - } - ] - }, - "span": 65 + } }, { "kind": { "Assign": [ { - "local": 0, + "local": 5, "projection": [] }, { "Cast": [ - "IntToInt", { - "Move": { + "PointerCoercion": "Unsize" + }, + { + "Copy": { "local": 6, "projection": [] } }, - 27 + 0 ] } ] - }, - "span": 66 - }, - { - "kind": { - "StorageDead": 6 - }, - "span": 67 - }, + } + } + ], + "terminator": { + "kind": { + "Call": { + "args": [ + { + "Move": { + "local": 5, + "projection": [] + } + }, + { + "Move": { + "local": 2, + "projection": [] + } + }, + { + "Move": { + "local": 3, + "projection": [] + } + }, + { + "Move": { + "local": 4, + "projection": [] + } + } + ], + "destination": { + "local": 0, + "projection": [] + }, + "func": { + "Constant": { + "const_": { + "kind": "ZeroSized" + }, + "user_ty": null + } + }, + "target": 1, + "unwind": "Continue" + } + } + } + }, + { + "statements": [ { "kind": { "StorageDead": 5 - }, - "span": 68 + } }, { "kind": { - "StorageDead": 2 - }, - "span": 69 + "StorageDead": 7 + } } ], "terminator": { - "kind": "Return", - "span": 62 + "kind": "Return" } } ], "locals": [ { - "mutability": "Mut", - "span": 70 + "mutability": "Mut" }, { - "mutability": "Mut", - "span": 45 + "mutability": "Not" }, { - "mutability": "Mut", - "span": 58 + "mutability": "Not" }, { - "mutability": "Mut", - "span": 57 + "mutability": "Not" }, { - "mutability": "Mut", - "span": 59 + "mutability": "Not" }, { - "mutability": "Mut", - "span": 64 + "mutability": "Mut" }, { - "mutability": "Mut", - "span": 65 + "mutability": "Not" + }, + { + "mutability": "Not" } ], - "span": 45, "spread_arg": null, "var_debug_info": [ { - "argument_index": null, + "argument_index": 1, "composite": null, "name": "main", "source_info": { - "scope": 0, - "span": 51 + "scope": 0 }, "value": { "Place": { "local": 1, - "projection": [ - "Deref", - { - "Field": [ - 0, - 18 - ] - } - ] + "projection": [] } } }, { - "argument_index": 1, + "argument_index": 2, "composite": null, - "name": "self", + "name": "argc", "source_info": { - "scope": 1, - "span": 71 + "scope": 0 }, "value": { "Place": { @@ -1370,265 +1147,288 @@ } }, { - "argument_index": 1, + "argument_index": 3, "composite": null, - "name": "self", + "name": "argv", "source_info": { - "scope": 2, - "span": 72 + "scope": 0 }, "value": { "Place": { - "local": 5, + "local": 3, + "projection": [] + } + } + }, + { + "argument_index": 4, + "composite": null, + "name": "sigpipe", + "source_info": { + "scope": 0 + }, + "value": { + "Place": { + "local": 4, "projection": [] } } } ] }, - "id": 3, - "name": "std::rt::lang_start::<()>::{closure#0}" + "name": "std::rt::lang_start::<()>" } }, - "symbol_name": "_ZN3std2rt10lang_start28_$u7b$$u7b$closure$u7d$$u7d$17h" + "symbol_name": "_ZN3std2rt10lang_start17h" }, { "details": null, "mono_item_kind": { "MonoItemFn": { "body": { - "arg_count": 2, + "arg_count": 1, "blocks": [ { - "statements": [], - "terminator": { - "kind": { - "Call": { - "args": [], - "destination": { - "local": 0, - "projection": [] - }, - "func": { - "Move": { - "local": 1, + "statements": [ + { + "kind": { + "StorageLive": 2 + } + }, + { + "kind": { + "StorageLive": 3 + } + }, + { + "kind": { + "StorageLive": 4 + } + }, + { + "kind": { + "Assign": [ + { + "local": 4, "projection": [] + }, + { + "Use": { + "Copy": { + "local": 1, + "projection": [ + "Deref", + { + "Field": [ + 0, + 0 + ] + } + ] + } + } } - }, - "target": 1, - "unwind": "Continue" + ] } - }, - "span": 85 - } - }, - { - "statements": [], - "terminator": { - "kind": "Return", - "span": 85 - } - } - ], - "locals": [ - { - "mutability": "Mut", - "span": 85 - }, - { - "mutability": "Not", - "span": 85 - }, - { - "mutability": "Not", - "span": 85 - } - ], - "span": 85, - "spread_arg": 2, - "var_debug_info": [] - }, - "id": 5, - "name": ">::call_once" - } - }, - "symbol_name": "_ZN4core3ops8function6FnOnce9call_once17h" - }, - { - "details": null, - "mono_item_kind": { - "MonoItemFn": { - "body": { - "arg_count": 2, - "blocks": [ - { - "statements": [], + } + ], "terminator": { "kind": { "Call": { "args": [ { "Move": { - "local": 1, - "projection": [ - "Deref" - ] - } - }, - { - "Move": { - "local": 2, + "local": 4, "projection": [] } } ], "destination": { - "local": 0, + "local": 3, "projection": [] }, "func": { "Constant": { "const_": { - "id": 8, "kind": "ZeroSized" }, - "span": 85, "user_ty": null } }, "target": 1, "unwind": "Continue" } - }, - "span": 85 - } - }, - { - "statements": [], - "terminator": { - "kind": "Return", - "span": 85 + } } - } - ], - "locals": [ - { - "mutability": "Mut", - "span": 85 - }, - { - "mutability": "Not", - "span": 85 }, { - "mutability": "Not", - "span": 85 - } - ], - "span": 85, - "spread_arg": 2, - "var_debug_info": [] - }, - "id": 5, - "name": "<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once" - } - }, - "symbol_name": "_ZN4core3ops8function6FnOnce40call_once$u7b$$u7b$vtable.shim$u7d$$u7d$17h" - }, - { - "details": null, - "mono_item_kind": { - "MonoItemFn": { - "body": { - "arg_count": 2, - "blocks": [ - { - "statements": [], + "statements": [ + { + "kind": { + "StorageDead": 4 + } + } + ], "terminator": { "kind": { "Call": { "args": [ { "Move": { - "local": 2, - "projection": [] - } - }, - { - "Move": { - "local": 1, + "local": 3, "projection": [] } } ], "destination": { - "local": 0, + "local": 2, "projection": [] }, "func": { "Constant": { "const_": { - "id": 18, "kind": "ZeroSized" }, - "span": 141, "user_ty": null } }, - "target": 1, + "target": 2, "unwind": "Continue" } - }, - "span": 142 + } } }, { - "statements": [], + "statements": [ + { + "kind": { + "StorageDead": 3 + } + }, + { + "kind": { + "StorageLive": 5 + } + }, + { + "kind": { + "Assign": [ + { + "local": 5, + "projection": [] + }, + { + "Use": { + "Copy": { + "local": 2, + "projection": [ + { + "Field": [ + 0, + 0 + ] + }, + { + "Field": [ + 0, + 0 + ] + } + ] + } + } + } + ] + } + }, + { + "kind": { + "Assign": [ + { + "local": 0, + "projection": [] + }, + { + "Cast": [ + "IntToInt", + { + "Move": { + "local": 5, + "projection": [] + } + }, + 0 + ] + } + ] + } + }, + { + "kind": { + "StorageDead": 5 + } + }, + { + "kind": { + "StorageDead": 2 + } + } + ], "terminator": { - "kind": "Return", - "span": 143 + "kind": "Return" } } ], "locals": [ { - "mutability": "Mut", - "span": 144 + "mutability": "Mut" + }, + { + "mutability": "Mut" }, { - "mutability": "Not", - "span": 145 + "mutability": "Mut" }, { - "mutability": "Not", - "span": 146 + "mutability": "Mut" + }, + { + "mutability": "Mut" + }, + { + "mutability": "Mut" } ], - "span": 147, "spread_arg": null, "var_debug_info": [ { - "argument_index": 1, + "argument_index": null, "composite": null, - "name": "self", + "name": "main", "source_info": { - "scope": 0, - "span": 145 + "scope": 0 }, "value": { "Place": { "local": 1, - "projection": [] + "projection": [ + "Deref", + { + "Field": [ + 0, + 0 + ] + } + ] } } }, { - "argument_index": 2, + "argument_index": 1, "composite": null, - "name": "index", + "name": "self", "source_info": { - "scope": 0, - "span": 146 + "scope": 1 }, "value": { "Place": { @@ -1639,61 +1439,36 @@ } ] }, - "id": 11, - "name": "core::slice::index::> for [i32]>::index" + "name": "std::rt::lang_start::<()>::{closure#0}" } }, - "symbol_name": "_ZN4core5slice5index74_$LT$impl$u20$core..ops..index..Index$LT$I$GT$$u20$for$u20$$u5b$T$u5d$$GT$5index17h" + "symbol_name": "_ZN3std2rt10lang_start28_$u7b$$u7b$closure$u7d$$u7d$17h" }, { "details": null, "mono_item_kind": { "MonoItemFn": { "body": { - "arg_count": 2, + "arg_count": 1, "blocks": [ { - "statements": [ - { - "kind": { - "Assign": [ - { - "local": 3, - "projection": [] - }, - { - "Cast": [ - { - "PointerCoercion": "Unsize" - }, - { - "Copy": { - "local": 1, - "projection": [] - } - }, - 5 - ] - } - ] - }, - "span": 89 - } - ], + "statements": [], "terminator": { "kind": { "Call": { "args": [ { "Move": { - "local": 3, + "local": 1, "projection": [] } }, { - "Move": { - "local": 2, - "projection": [] + "Constant": { + "const_": { + "kind": "ZeroSized" + }, + "user_ty": null } } ], @@ -1704,56 +1479,76 @@ "func": { "Constant": { "const_": { - "id": 10, "kind": "ZeroSized" }, - "span": 87, "user_ty": null } }, "target": 1, "unwind": "Continue" } - }, - "span": 88 + } + } + }, + { + "statements": [], + "terminator": { + "kind": { + "Call": { + "args": [ + { + "Constant": { + "const_": { + "kind": "ZeroSized" + }, + "user_ty": null + } + } + ], + "destination": { + "local": 2, + "projection": [] + }, + "func": { + "Constant": { + "const_": { + "kind": "ZeroSized" + }, + "user_ty": null + } + }, + "target": 2, + "unwind": "Unreachable" + } + } } }, { "statements": [], "terminator": { - "kind": "Return", - "span": 90 + "kind": "Return" } } ], "locals": [ { - "mutability": "Mut", - "span": 91 - }, - { - "mutability": "Not", - "span": 92 + "mutability": "Mut" }, { - "mutability": "Not", - "span": 93 + "mutability": "Not" }, { - "mutability": "Not", - "span": 89 + "mutability": "Not" } ], - "span": 94, "spread_arg": null, "var_debug_info": [ { "argument_index": 1, "composite": null, - "name": "self", + "name": "f", "source_info": { - "scope": 0, - "span": 92 + "scope": 0 }, "value": { "Place": { @@ -1763,27 +1558,41 @@ } }, { - "argument_index": 2, + "argument_index": null, "composite": null, - "name": "index", + "name": "result", "source_info": { - "scope": 0, - "span": 93 + "scope": 1 }, "value": { "Place": { - "local": 2, + "local": 0, "projection": [] } } + }, + { + "argument_index": 1, + "composite": null, + "name": "dummy", + "source_info": { + "scope": 2 + }, + "value": { + "Const": { + "const_": { + "kind": "ZeroSized" + }, + "user_ty": null + } + } } ] }, - "id": 7, - "name": "std::array::> for [i32; 4]>::index" + "name": "std::sys::backtrace::__rust_begin_short_backtrace::" } }, - "symbol_name": "_ZN4core5array85_$LT$impl$u20$core..ops..index..Index$LT$I$GT$$u20$for$u20$$u5b$T$u3b$$u20$N$u5d$$GT$5index17h" + "symbol_name": "_ZN3std3sys9backtrace28__rust_begin_short_backtrace17h" }, { "details": null, @@ -1793,43 +1602,17 @@ "arg_count": 2, "blocks": [ { - "statements": [ - { - "kind": { - "Assign": [ - { - "local": 3, - "projection": [] - }, - { - "Ref": [ - { - "kind": "ReErased" - }, - { - "Mut": { - "kind": "Default" - } - }, - { - "local": 1, - "projection": [] - } - ] - } - ] - }, - "span": 85 - } - ], + "statements": [], "terminator": { "kind": { "Call": { "args": [ { "Move": { - "local": 3, - "projection": [] + "local": 1, + "projection": [ + "Deref" + ] } }, { @@ -1846,93 +1629,94 @@ "func": { "Constant": { "const_": { - "id": 9, "kind": "ZeroSized" }, - "span": 85, "user_ty": null } }, "target": 1, - "unwind": { - "Cleanup": 3 - } + "unwind": "Continue" } - }, - "span": 85 + } } }, { "statements": [], "terminator": { - "kind": { - "Drop": { - "place": { - "local": 1, - "projection": [] - }, - "target": 2, - "unwind": "Continue" - } - }, - "span": 85 + "kind": "Return" } + } + ], + "locals": [ + { + "mutability": "Mut" }, { - "statements": [], - "terminator": { - "kind": "Return", - "span": 85 - } + "mutability": "Not" }, + { + "mutability": "Not" + } + ], + "spread_arg": 2, + "var_debug_info": [] + }, + "name": "<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once" + } + }, + "symbol_name": "_ZN4core3ops8function6FnOnce40call_once$u7b$$u7b$vtable.shim$u7d$$u7d$17h" + }, + { + "details": null, + "mono_item_kind": { + "MonoItemFn": { + "body": { + "arg_count": 2, + "blocks": [ { "statements": [], "terminator": { "kind": { - "Drop": { - "place": { - "local": 1, + "Call": { + "args": [], + "destination": { + "local": 0, "projection": [] }, - "target": 4, - "unwind": "Terminate" + "func": { + "Move": { + "local": 1, + "projection": [] + } + }, + "target": 1, + "unwind": "Continue" } - }, - "span": 85 + } } }, { "statements": [], "terminator": { - "kind": "Resume", - "span": 85 + "kind": "Return" } } ], "locals": [ { - "mutability": "Mut", - "span": 85 - }, - { - "mutability": "Not", - "span": 85 + "mutability": "Mut" }, { - "mutability": "Not", - "span": 85 + "mutability": "Not" }, { - "mutability": "Not", - "span": 85 + "mutability": "Not" } ], - "span": 85, "spread_arg": 2, "var_debug_info": [] }, - "id": 5, - "name": "<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once" + "name": ">::call_once" } }, "symbol_name": "_ZN4core3ops8function6FnOnce9call_once17h" @@ -1954,18 +1738,23 @@ "projection": [] }, { - "Use": { - "Copy": { + "Ref": [ + { + "kind": "ReErased" + }, + { + "Mut": { + "kind": "Default" + } + }, + { "local": 1, - "projection": [ - "Deref" - ] + "projection": [] } - } + ] } ] - }, - "span": 135 + } } ], "terminator": { @@ -1992,56 +1781,212 @@ "func": { "Constant": { "const_": { - "id": 17, "kind": "ZeroSized" }, - "span": 134, "user_ty": null } }, "target": 1, + "unwind": { + "Cleanup": 3 + } + } + } + } + }, + { + "statements": [], + "terminator": { + "kind": { + "Drop": { + "place": { + "local": 1, + "projection": [] + }, + "target": 2, "unwind": "Continue" } - }, - "span": 134 + } + } + }, + { + "statements": [], + "terminator": { + "kind": "Return" + } + }, + { + "statements": [], + "terminator": { + "kind": { + "Drop": { + "place": { + "local": 1, + "projection": [] + }, + "target": 4, + "unwind": "Terminate" + } + } } }, { "statements": [], "terminator": { - "kind": "Return", - "span": 136 + "kind": "Resume" } } ], "locals": [ { - "mutability": "Mut", - "span": 137 + "mutability": "Mut" }, { - "mutability": "Not", - "span": 138 + "mutability": "Not" }, { - "mutability": "Not", - "span": 139 + "mutability": "Not" }, { - "mutability": "Mut", - "span": 138 + "mutability": "Not" } ], - "span": 140, - "spread_arg": null, - "var_debug_info": [ - { + "spread_arg": 2, + "var_debug_info": [] + }, + "name": "<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once" + } + }, + "symbol_name": "_ZN4core3ops8function6FnOnce9call_once17h" + }, + { + "details": null, + "mono_item_kind": { + "MonoItemFn": { + "body": { + "arg_count": 1, + "blocks": [ + { + "statements": [], + "terminator": { + "kind": "Return" + } + } + ], + "locals": [ + { + "mutability": "Mut" + }, + { + "mutability": "Not" + } + ], + "spread_arg": null, + "var_debug_info": [] + }, + "name": "std::ptr::drop_in_place::<{closure@std::rt::lang_start<()>::{closure#0}}>" + } + }, + "symbol_name": "_ZN4core3ptr85drop_in_place$LT$std..rt..lang_start$LT$$LP$$RP$$GT$..$u7b$$u7b$closure$u7d$$u7d$$GT$17h" + }, + { + "details": null, + "mono_item_kind": { + "MonoItemFn": { + "body": { + "arg_count": 2, + "blocks": [ + { + "statements": [ + { + "kind": { + "Assign": [ + { + "local": 3, + "projection": [] + }, + { + "Cast": [ + { + "PointerCoercion": "Unsize" + }, + { + "Copy": { + "local": 1, + "projection": [] + } + }, + 0 + ] + } + ] + } + } + ], + "terminator": { + "kind": { + "Call": { + "args": [ + { + "Move": { + "local": 3, + "projection": [] + } + }, + { + "Move": { + "local": 2, + "projection": [] + } + } + ], + "destination": { + "local": 0, + "projection": [] + }, + "func": { + "Constant": { + "const_": { + "kind": "ZeroSized" + }, + "user_ty": null + } + }, + "target": 1, + "unwind": "Continue" + } + } + } + }, + { + "statements": [], + "terminator": { + "kind": "Return" + } + } + ], + "locals": [ + { + "mutability": "Mut" + }, + { + "mutability": "Not" + }, + { + "mutability": "Not" + }, + { + "mutability": "Not" + } + ], + "spread_arg": null, + "var_debug_info": [ + { "argument_index": 1, "composite": null, "name": "self", "source_info": { - "scope": 0, - "span": 138 + "scope": 0 }, "value": { "Place": { @@ -2053,10 +1998,9 @@ { "argument_index": 2, "composite": null, - "name": "other", + "name": "index", "source_info": { - "scope": 0, - "span": 139 + "scope": 0 }, "value": { "Place": { @@ -2067,11 +2011,10 @@ } ] }, - "id": 10, - "name": "std::array::equality:: for &[i32]>::eq" + "name": "std::array::> for [i32; 4]>::index" } }, - "symbol_name": "_ZN4core5array8equality96_$LT$impl$u20$core..cmp..PartialEq$LT$$u5b$U$u3b$$u20$N$u5d$$GT$$u20$for$u20$$RF$$u5b$T$u5d$$GT$2eq17h" + "symbol_name": "_ZN4core5array85_$LT$impl$u20$core..ops..index..Index$LT$I$GT$$u20$for$u20$$u5b$T$u3b$$u20$N$u5d$$GT$5index17h" }, { "details": null, @@ -2085,38 +2028,32 @@ { "kind": { "StorageLive": 3 - }, - "span": 96 + } }, { "kind": { "StorageLive": 5 - }, - "span": 97 + } }, { "kind": { "StorageLive": 9 - }, - "span": 98 + } }, { "kind": { "StorageLive": 10 - }, - "span": 98 + } }, { "kind": { "StorageLive": 6 - }, - "span": 95 + } }, { "kind": { "StorageLive": 7 - }, - "span": 99 + } }, { "kind": { @@ -2137,8 +2074,7 @@ ] } ] - }, - "span": 99 + } }, { "kind": { @@ -2159,7 +2095,6 @@ { "Constant": { "const_": { - "id": 11, "kind": { "Allocated": { "align": 8, @@ -2180,15 +2115,13 @@ } } }, - "span": 100, "user_ty": null } } ] } ] - }, - "span": 95 + } } ], "terminator": { @@ -2210,8 +2143,7 @@ "otherwise": 2 } } - }, - "span": 95 + } } }, { @@ -2219,13 +2151,11 @@ { "kind": { "StorageDead": 3 - }, - "span": 102 + } } ], "terminator": { - "kind": "Return", - "span": 101 + "kind": "Return" } }, { @@ -2233,14 +2163,12 @@ { "kind": { "StorageDead": 7 - }, - "span": 100 + } }, { "kind": { "StorageLive": 8 - }, - "span": 105 + } }, { "kind": { @@ -2251,7 +2179,7 @@ }, { "AddressOf": [ - "Not", + "Const", { "local": 1, "projection": [ @@ -2261,8 +2189,7 @@ ] } ] - }, - "span": 106 + } }, { "kind": { @@ -2280,12 +2207,11 @@ "projection": [] } }, - 39 + 0 ] } ] - }, - "span": 107 + } }, { "kind": { @@ -2309,8 +2235,7 @@ ] } ] - }, - "span": 108 + } }, { "kind": { @@ -2323,11 +2248,11 @@ "Aggregate": [ { "Adt": [ - 1, + 0, 1, [ { - "Type": 40 + "Type": 0 } ], null, @@ -2345,38 +2270,32 @@ ] } ] - }, - "span": 109 + } }, { "kind": { "StorageDead": 8 - }, - "span": 110 + } }, { "kind": { "StorageDead": 6 - }, - "span": 111 + } }, { "kind": { "StorageDead": 10 - }, - "span": 98 + } }, { "kind": { "StorageDead": 9 - }, - "span": 98 + } }, { "kind": { "StorageLive": 11 - }, - "span": 112 + } }, { "kind": { @@ -2396,7 +2315,7 @@ { "Field": [ 0, - 40 + 0 ] } ] @@ -2404,8 +2323,7 @@ } } ] - }, - "span": 113 + } }, { "kind": { @@ -2418,14 +2336,14 @@ "Aggregate": [ { "Adt": [ - 9, + 0, 0, [ { - "Type": 40 + "Type": 0 }, { - "Type": 41 + "Type": 0 } ], null, @@ -2443,20 +2361,17 @@ ] } ] - }, - "span": 114 + } }, { "kind": { "StorageDead": 11 - }, - "span": 112 + } }, { "kind": { "StorageDead": 5 - }, - "span": 115 + } }, { "kind": { @@ -2476,7 +2391,7 @@ { "Field": [ 0, - 40 + 0 ] } ] @@ -2484,8 +2399,7 @@ } } ] - }, - "span": 116 + } } ], "terminator": { @@ -2512,18 +2426,15 @@ "func": { "Constant": { "const_": { - "id": 12, "kind": "ZeroSized" }, - "span": 103, "user_ty": null } }, "target": 1, "unwind": "Continue" } - }, - "span": 104 + } } }, { @@ -2531,8 +2442,7 @@ { "kind": { "StorageDead": 7 - }, - "span": 100 + } }, { "kind": { @@ -2545,7 +2455,6 @@ "Use": { "Constant": { "const_": { - "id": 13, "kind": { "Allocated": { "align": 8, @@ -2566,38 +2475,32 @@ } } }, - "span": 74, "user_ty": null } } } ] - }, - "span": 118 + } }, { "kind": { "StorageDead": 6 - }, - "span": 111 + } }, { "kind": { "StorageDead": 10 - }, - "span": 98 + } }, { "kind": { "StorageDead": 9 - }, - "span": 98 + } }, { "kind": { "StorageLive": 11 - }, - "span": 112 + } }, { "kind": { @@ -2610,7 +2513,6 @@ "Use": { "Constant": { "const_": { - "id": 14, "kind": { "Allocated": { "align": 8, @@ -2631,26 +2533,22 @@ } } }, - "span": 74, "user_ty": null } } } ] - }, - "span": 119 + } }, { "kind": { "StorageDead": 11 - }, - "span": 112 + } }, { "kind": { "StorageDead": 5 - }, - "span": 115 + } }, { "kind": { @@ -2663,7 +2561,6 @@ "Use": { "Constant": { "const_": { - "id": 15, "kind": { "Allocated": { "align": 1, @@ -2677,14 +2574,12 @@ } } }, - "span": 117, "user_ty": null } } } ] - }, - "span": 117 + } } ], "terminator": { @@ -2692,62 +2587,48 @@ "Goto": { "target": 1 } - }, - "span": 117 + } } } ], "locals": [ { - "mutability": "Mut", - "span": 120 + "mutability": "Mut" }, { - "mutability": "Not", - "span": 121 + "mutability": "Not" }, { - "mutability": "Not", - "span": 122 + "mutability": "Not" }, { - "mutability": "Not", - "span": 96 + "mutability": "Not" }, { - "mutability": "Not", - "span": 116 + "mutability": "Not" }, { - "mutability": "Mut", - "span": 97 + "mutability": "Mut" }, { - "mutability": "Mut", - "span": 95 + "mutability": "Mut" }, { - "mutability": "Mut", - "span": 99 + "mutability": "Mut" }, { - "mutability": "Not", - "span": 105 + "mutability": "Not" }, { - "mutability": "Not", - "span": 123 + "mutability": "Not" }, { - "mutability": "Mut", - "span": 124 + "mutability": "Mut" }, { - "mutability": "Not", - "span": 113 + "mutability": "Not" } ], - "span": 133, "spread_arg": null, "var_debug_info": [ { @@ -2755,8 +2636,7 @@ "composite": null, "name": "self", "source_info": { - "scope": 0, - "span": 121 + "scope": 0 }, "value": { "Place": { @@ -2770,8 +2650,7 @@ "composite": null, "name": "other", "source_info": { - "scope": 0, - "span": 122 + "scope": 0 }, "value": { "Place": { @@ -2785,8 +2664,7 @@ "composite": null, "name": "b", "source_info": { - "scope": 1, - "span": 96 + "scope": 1 }, "value": { "Place": { @@ -2800,8 +2678,7 @@ "composite": null, "name": "b", "source_info": { - "scope": 2, - "span": 116 + "scope": 2 }, "value": { "Place": { @@ -2815,8 +2692,7 @@ "composite": null, "name": "self", "source_info": { - "scope": 3, - "span": 125 + "scope": 3 }, "value": { "Place": { @@ -2830,8 +2706,7 @@ "composite": null, "name": "slice", "source_info": { - "scope": 4, - "span": 126 + "scope": 4 }, "value": { "Place": { @@ -2845,8 +2720,7 @@ "composite": null, "name": "self", "source_info": { - "scope": 5, - "span": 127 + "scope": 5 }, "value": { "Place": { @@ -2860,8 +2734,7 @@ "composite": null, "name": "ptr", "source_info": { - "scope": 6, - "span": 105 + "scope": 6 }, "value": { "Place": { @@ -2875,8 +2748,7 @@ "composite": null, "name": "me", "source_info": { - "scope": 7, - "span": 123 + "scope": 7 }, "value": { "Place": { @@ -2890,8 +2762,7 @@ "composite": null, "name": "self", "source_info": { - "scope": 8, - "span": 128 + "scope": 8 }, "value": { "Place": { @@ -2905,8 +2776,7 @@ "composite": null, "name": "self", "source_info": { - "scope": 9, - "span": 129 + "scope": 9 }, "value": { "Place": { @@ -2920,16 +2790,13 @@ "composite": null, "name": "err", "source_info": { - "scope": 9, - "span": 130 + "scope": 9 }, "value": { "Const": { "const_": { - "id": 16, "kind": "ZeroSized" }, - "span": 74, "user_ty": null } } @@ -2939,8 +2806,7 @@ "composite": null, "name": "v", "source_info": { - "scope": 10, - "span": 113 + "scope": 10 }, "value": { "Place": { @@ -2954,8 +2820,7 @@ "composite": null, "name": "self", "source_info": { - "scope": 11, - "span": 131 + "scope": 11 }, "value": { "Place": { @@ -2969,8 +2834,7 @@ "composite": null, "name": "other", "source_info": { - "scope": 11, - "span": 132 + "scope": 11 }, "value": { "Place": { @@ -2981,7 +2845,6 @@ } ] }, - "id": 8, "name": "std::array::equality:: for [i32]>::eq" } }, @@ -2996,12 +2859,6 @@ "blocks": [ { "statements": [ - { - "kind": { - "StorageLive": 3 - }, - "span": 155 - }, { "kind": { "Assign": [ @@ -3010,20 +2867,17 @@ "projection": [] }, { - "Cast": [ - "Transmute", - { - "Copy": { - "local": 2, - "projection": [] - } - }, - 40 - ] + "Use": { + "Copy": { + "local": 1, + "projection": [ + "Deref" + ] + } + } } ] - }, - "span": 155 + } } ], "terminator": { @@ -3032,13 +2886,13 @@ "args": [ { "Move": { - "local": 1, + "local": 3, "projection": [] } }, { "Move": { - "local": 3, + "local": 2, "projection": [] } } @@ -3050,63 +2904,46 @@ "func": { "Constant": { "const_": { - "id": 20, "kind": "ZeroSized" }, - "span": 153, "user_ty": null } }, "target": 1, - "unwind": "Unreachable" + "unwind": "Continue" } - }, - "span": 154 + } } }, { - "statements": [ - { - "kind": { - "StorageDead": 3 - }, - "span": 157 - } - ], + "statements": [], "terminator": { - "kind": "Return", - "span": 156 + "kind": "Return" } } ], "locals": [ { - "mutability": "Mut", - "span": 158 + "mutability": "Mut" }, { - "mutability": "Not", - "span": 159 + "mutability": "Not" }, { - "mutability": "Not", - "span": 160 + "mutability": "Not" }, { - "mutability": "Mut", - "span": 155 + "mutability": "Mut" } ], - "span": 161, "spread_arg": null, "var_debug_info": [ { "argument_index": 1, "composite": null, - "name": "a", + "name": "self", "source_info": { - "scope": 0, - "span": 159 + "scope": 0 }, "value": { "Place": { @@ -3118,10 +2955,9 @@ { "argument_index": 2, "composite": null, - "name": "b", + "name": "other", "source_info": { - "scope": 0, - "span": 160 + "scope": 0 }, "value": { "Place": { @@ -3132,11 +2968,10 @@ } ] }, - "id": 13, - "name": ">::spec_eq" + "name": "std::array::equality:: for &[i32]>::eq" } }, - "symbol_name": "_ZN69_$LT$T$u20$as$u20$core..array..equality..SpecArrayEq$LT$U$C$_$GT$$GT$7spec_eq17h" + "symbol_name": "_ZN4core5array8equality96_$LT$impl$u20$core..cmp..PartialEq$LT$$u5b$U$u3b$$u20$N$u5d$$GT$$u20$for$u20$$RF$$u5b$T$u5d$$GT$2eq17h" }, { "details": null, @@ -3145,124 +2980,6 @@ "body": { "arg_count": 2, "blocks": [ - { - "statements": [ - { - "kind": { - "StorageLive": 5 - }, - "span": 1 - }, - { - "kind": { - "Assign": [ - { - "local": 6, - "projection": [] - }, - { - "Use": { - "Copy": { - "local": 1, - "projection": [ - { - "Field": [ - 1, - 0 - ] - } - ] - } - } - } - ] - }, - "span": 2 - }, - { - "kind": { - "Assign": [ - { - "local": 7, - "projection": [] - }, - { - "Use": { - "Copy": { - "local": 1, - "projection": [ - { - "Field": [ - 0, - 0 - ] - } - ] - } - } - } - ] - }, - "span": 3 - }, - { - "kind": { - "StorageLive": 13 - }, - "span": 0 - }, - { - "kind": { - "Assign": [ - { - "local": 13, - "projection": [] - }, - { - "BinaryOp": [ - "Lt", - { - "Copy": { - "local": 6, - "projection": [] - } - }, - { - "Copy": { - "local": 7, - "projection": [] - } - } - ] - } - ] - }, - "span": 0 - } - ], - "terminator": { - "kind": { - "SwitchInt": { - "discr": { - "Move": { - "local": 13, - "projection": [] - } - }, - "targets": { - "branches": [ - [ - 0, - 4 - ] - ], - "otherwise": 3 - } - } - }, - "span": 0 - } - }, { "statements": [], "terminator": { @@ -3271,263 +2988,387 @@ "args": [ { "Move": { - "local": 6, + "local": 2, "projection": [] } }, { "Move": { - "local": 9, + "local": 1, "projection": [] } } ], "destination": { - "local": 10, + "local": 0, "projection": [] }, "func": { "Constant": { "const_": { - "id": 0, "kind": "ZeroSized" }, - "span": 4, "user_ty": null } }, - "target": null, + "target": 1, "unwind": "Continue" } - }, - "span": 5 + } + } + }, + { + "statements": [], + "terminator": { + "kind": "Return" + } + } + ], + "locals": [ + { + "mutability": "Mut" + }, + { + "mutability": "Not" + }, + { + "mutability": "Not" + } + ], + "spread_arg": null, + "var_debug_info": [ + { + "argument_index": 1, + "composite": null, + "name": "self", + "source_info": { + "scope": 0 + }, + "value": { + "Place": { + "local": 1, + "projection": [] + } } }, + { + "argument_index": 2, + "composite": null, + "name": "index", + "source_info": { + "scope": 0 + }, + "value": { + "Place": { + "local": 2, + "projection": [] + } + } + } + ] + }, + "name": "core::slice::index::> for [i32]>::index" + } + }, + "symbol_name": "_ZN4core5slice5index74_$LT$impl$u20$core..ops..index..Index$LT$I$GT$$u20$for$u20$$u5b$T$u5d$$GT$5index17h" + }, + { + "details": null, + "mono_item_kind": { + "MonoItemFn": { + "body": { + "arg_count": 1, + "blocks": [ { "statements": [ - { - "kind": { - "StorageDead": 8 - }, - "span": 7 - }, - { - "kind": { - "StorageLive": 11 - }, - "span": 8 - }, - { - "kind": { - "StorageLive": 12 - }, - "span": 9 - }, { "kind": { "Assign": [ { - "local": 12, + "local": 0, "projection": [] }, { - "AddressOf": [ - "Not", - { - "local": 2, - "projection": [ - "Deref" - ] + "Use": { + "Constant": { + "const_": { + "kind": { + "Allocated": { + "align": 1, + "bytes": [ + 0 + ], + "mutability": "Mut", + "provenance": { + "ptrs": [] + } + } + } + }, + "user_ty": null } - ] + } } ] - }, - "span": 9 - }, - { - "kind": { - "StorageLive": 15 - }, - "span": 8 - }, - { - "kind": { - "StorageLive": 16 - }, - "span": 10 - }, + } + } + ], + "terminator": { + "kind": "Return" + } + } + ], + "locals": [ + { + "mutability": "Mut" + }, + { + "mutability": "Not" + } + ], + "spread_arg": null, + "var_debug_info": [] + }, + "name": "<() as std::process::Termination>::report" + } + }, + "symbol_name": "_ZN54_$LT$$LP$$RP$$u20$as$u20$std..process..Termination$GT$6report17h" + }, + { + "details": null, + "mono_item_kind": { + "MonoItemFn": { + "body": { + "arg_count": 0, + "blocks": [ + { + "statements": [ { "kind": { "Assign": [ { - "local": 16, + "local": 1, "projection": [] }, { - "Cast": [ - "PtrToPtr", + "Aggregate": [ { - "Copy": { - "local": 12, - "projection": [] - } + "Array": 0 }, - 2 + [ + { + "Constant": { + "const_": { + "kind": { + "Allocated": { + "align": 4, + "bytes": [ + 1, + 0, + 0, + 0 + ], + "mutability": "Mut", + "provenance": { + "ptrs": [] + } + } + } + }, + "user_ty": null + } + }, + { + "Constant": { + "const_": { + "kind": { + "Allocated": { + "align": 4, + "bytes": [ + 2, + 0, + 0, + 0 + ], + "mutability": "Mut", + "provenance": { + "ptrs": [] + } + } + } + }, + "user_ty": null + } + }, + { + "Constant": { + "const_": { + "kind": { + "Allocated": { + "align": 4, + "bytes": [ + 3, + 0, + 0, + 0 + ], + "mutability": "Mut", + "provenance": { + "ptrs": [] + } + } + } + }, + "user_ty": null + } + }, + { + "Constant": { + "const_": { + "kind": { + "Allocated": { + "align": 4, + "bytes": [ + 4, + 0, + 0, + 0 + ], + "mutability": "Mut", + "provenance": { + "ptrs": [] + } + } + } + }, + "user_ty": null + } + } + ] ] } ] - }, - "span": 11 + } }, { "kind": { "Assign": [ { - "local": 15, + "local": 4, "projection": [] }, { - "BinaryOp": [ - "Offset", + "Ref": [ { - "Copy": { - "local": 16, - "projection": [] - } + "kind": "ReErased" }, + "Shared", { - "Copy": { - "local": 7, - "projection": [] - } + "local": 1, + "projection": [] } ] } ] - }, - "span": 12 - }, - { - "kind": { - "StorageDead": 16 - }, - "span": 10 + } }, { "kind": { "Assign": [ { - "local": 11, + "local": 5, "projection": [] }, { "Aggregate": [ { - "RawPtr": [ - 3, - "Not" + "Adt": [ + 0, + 0, + [ + { + "Type": 0 + } + ], + null, + null ] }, [ { - "Copy": { - "local": 15, - "projection": [] + "Constant": { + "const_": { + "kind": { + "Allocated": { + "align": 8, + "bytes": [ + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "mutability": "Mut", + "provenance": { + "ptrs": [] + } + } + } + }, + "user_ty": null } }, { - "Copy": { - "local": 4, - "projection": [] + "Constant": { + "const_": { + "kind": { + "Allocated": { + "align": 8, + "bytes": [ + 3, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "mutability": "Mut", + "provenance": { + "ptrs": [] + } + } + } + }, + "user_ty": null } } ] ] } ] - }, - "span": 13 - }, - { - "kind": { - "StorageDead": 15 - }, - "span": 8 - }, - { - "kind": { - "StorageDead": 12 - }, - "span": 14 - }, - { - "kind": { - "Assign": [ + } + } + ], + "terminator": { + "kind": { + "Call": { + "args": [ { - "local": 0, - "projection": [] + "Move": { + "local": 4, + "projection": [] + } }, { - "Ref": [ - { - "kind": "ReErased" - }, - "Shared", - { - "local": 11, - "projection": [ - "Deref" - ] - } - ] - } - ] - }, - "span": 15 - }, - { - "kind": { - "StorageDead": 11 - }, - "span": 16 - } - ], - "terminator": { - "kind": "Return", - "span": 6 - } - }, - { - "statements": [ - { - "kind": { - "StorageDead": 13 - }, - "span": 19 - }, - { - "kind": { - "StorageDead": 5 - }, - "span": 20 - } - ], - "terminator": { - "kind": { - "Call": { - "args": [ - { - "Move": { - "local": 7, - "projection": [] - } - }, - { - "Move": { - "local": 6, - "projection": [] - } + "Move": { + "local": 5, + "projection": [] + } } ], "destination": { @@ -3537,202 +3378,146 @@ "func": { "Constant": { "const_": { - "id": 1, "kind": "ZeroSized" }, - "span": 17, "user_ty": null } }, - "target": null, + "target": 1, "unwind": "Continue" } - }, - "span": 18 + } } }, { "statements": [ - { - "kind": { - "StorageLive": 14 - }, - "span": 22 - }, { "kind": { "Assign": [ { - "local": 14, + "local": 2, "projection": [] }, { - "BinaryOp": [ - "SubUnchecked", - { - "Copy": { - "local": 6, - "projection": [] - } - }, - { - "Copy": { - "local": 7, - "projection": [] - } + "Use": { + "Copy": { + "local": 3, + "projection": [] } - ] + } } ] - }, - "span": 23 + } }, { "kind": { "Assign": [ { - "local": 5, + "local": 7, "projection": [] }, { - "Aggregate": [ + "Ref": [ { - "Adt": [ - 1, - 1, - [ - { - "Type": 0 - } - ], - null, - null - ] + "kind": "ReErased" }, - [ - { - "Move": { - "local": 14, - "projection": [] - } - } - ] + "Shared", + { + "local": 2, + "projection": [] + } ] } ] - }, - "span": 24 - }, - { - "kind": { - "StorageDead": 14 - }, - "span": 25 - }, - { - "kind": { - "StorageDead": 13 - }, - "span": 19 + } }, { "kind": { "Assign": [ { - "local": 4, + "local": 8, "projection": [] }, { "Use": { - "Copy": { - "local": 5, - "projection": [ - { - "Downcast": 1 - }, - { - "Field": [ - 0, - 0 - ] + "Constant": { + "const_": { + "kind": { + "Allocated": { + "align": 8, + "bytes": [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "mutability": "Mut", + "provenance": { + "ptrs": [ + [ + 0, + 0 + ] + ] + } + } } - ] + }, + "user_ty": null } } } ] - }, - "span": 26 - }, - { - "kind": { - "StorageDead": 5 - }, - "span": 20 - }, - { - "kind": { - "StorageLive": 8 - }, - "span": 21 - }, - { - "kind": { - "Assign": [ + } + } + ], + "terminator": { + "kind": { + "Call": { + "args": [ { - "local": 9, - "projection": [] + "Move": { + "local": 7, + "projection": [] + } }, { - "UnaryOp": [ - "PtrMetadata", - { - "Copy": { - "local": 2, - "projection": [] - } - } - ] + "Move": { + "local": 8, + "projection": [] + } } - ] - }, - "span": 27 - }, - { - "kind": { - "Assign": [ - { - "local": 8, - "projection": [] - }, - { - "BinaryOp": [ - "Gt", - { - "Copy": { - "local": 6, - "projection": [] - } - }, - { - "Copy": { - "local": 9, - "projection": [] - } - } - ] + ], + "destination": { + "local": 6, + "projection": [] + }, + "func": { + "Constant": { + "const_": { + "kind": "ZeroSized" + }, + "user_ty": null } - ] - }, - "span": 21 + }, + "target": 2, + "unwind": "Continue" + } } - ], + } + }, + { + "statements": [], "terminator": { "kind": { "SwitchInt": { "discr": { "Move": { - "local": 8, + "local": 6, "projection": [] } }, @@ -3740,394 +3525,190 @@ "branches": [ [ 0, - 2 + 4 ] ], - "otherwise": 1 + "otherwise": 3 } } - }, - "span": 21 + } } - } - ], - "locals": [ - { - "mutability": "Mut", - "span": 28 - }, - { - "mutability": "Not", - "span": 29 - }, - { - "mutability": "Not", - "span": 30 - }, - { - "mutability": "Mut", - "span": 31 }, { - "mutability": "Not", - "span": 26 + "statements": [], + "terminator": { + "kind": "Return" + } }, { - "mutability": "Mut", - "span": 1 - }, - { - "mutability": "Mut", - "span": 2 - }, + "statements": [], + "terminator": { + "kind": { + "Call": { + "args": [ + { + "Constant": { + "const_": { + "kind": { + "Allocated": { + "align": 8, + "bytes": [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 29, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "mutability": "Mut", + "provenance": { + "ptrs": [ + [ + 0, + 1 + ] + ] + } + } + } + }, + "user_ty": null + } + } + ], + "destination": { + "local": 9, + "projection": [] + }, + "func": { + "Constant": { + "const_": { + "kind": "ZeroSized" + }, + "user_ty": null + } + }, + "target": null, + "unwind": "Continue" + } + } + } + } + ], + "locals": [ { - "mutability": "Mut", - "span": 3 + "mutability": "Mut" }, { - "mutability": "Mut", - "span": 21 + "mutability": "Not" }, { - "mutability": "Mut", - "span": 27 + "mutability": "Not" }, { - "mutability": "Not", - "span": 5 + "mutability": "Not" }, { - "mutability": "Not", - "span": 8 + "mutability": "Mut" }, { - "mutability": "Mut", - "span": 9 + "mutability": "Mut" }, { - "mutability": "Mut", - "span": 0 + "mutability": "Mut" }, { - "mutability": "Mut", - "span": 22 + "mutability": "Mut" }, { - "mutability": "Not", - "span": 32 + "mutability": "Mut" }, { - "mutability": "Not", - "span": 33 + "mutability": "Mut" } ], - "span": 41, "spread_arg": null, "var_debug_info": [ - { - "argument_index": 1, - "composite": null, - "name": "self", - "source_info": { - "scope": 0, - "span": 29 - }, - "value": { - "Place": { - "local": 1, - "projection": [] - } - } - }, - { - "argument_index": 2, - "composite": null, - "name": "slice", - "source_info": { - "scope": 0, - "span": 30 - }, - "value": { - "Place": { - "local": 2, - "projection": [] - } - } - }, - { - "argument_index": null, - "composite": null, - "name": "new_len", - "source_info": { - "scope": 1, - "span": 26 - }, - "value": { - "Place": { - "local": 4, - "projection": [] - } - } - }, - { - "argument_index": 1, - "composite": null, - "name": "self", - "source_info": { - "scope": 2, - "span": 34 - }, - "value": { - "Place": { - "local": 6, - "projection": [] - } - } - }, - { - "argument_index": 2, - "composite": null, - "name": "rhs", - "source_info": { - "scope": 2, - "span": 35 - }, - "value": { - "Place": { - "local": 7, - "projection": [] - } - } - }, - { - "argument_index": 1, - "composite": null, - "name": "ptr", - "source_info": { - "scope": 3, - "span": 36 - }, - "value": { - "Place": { - "local": 2, - "projection": [] - } - } - }, - { - "argument_index": 2, - "composite": null, - "name": "offset", - "source_info": { - "scope": 3, - "span": 37 - }, - "value": { - "Place": { - "local": 7, - "projection": [] - } - } - }, - { - "argument_index": 3, - "composite": null, - "name": "len", - "source_info": { - "scope": 3, - "span": 38 - }, - "value": { - "Place": { - "local": 4, - "projection": [] - } - } - }, { "argument_index": null, "composite": null, - "name": "ptr", - "source_info": { - "scope": 4, - "span": 32 - }, - "value": { - "Place": { - "local": 15, - "projection": [] - } - } - }, - { - "argument_index": 1, - "composite": null, - "name": "ptr", - "source_info": { - "scope": 5, - "span": 39 - }, - "value": { - "Place": { - "local": 2, - "projection": [] - } - } - }, - { - "argument_index": 2, - "composite": null, - "name": "index", - "source_info": { - "scope": 5, - "span": 40 - }, - "value": { - "Place": { - "local": 7, - "projection": [] - } - } - }, - { - "argument_index": null, - "composite": null, - "name": "ptr", + "name": "a", "source_info": { - "scope": 6, - "span": 33 + "scope": 1 }, "value": { "Place": { - "local": 16, + "local": 1, "projection": [] } } - } - ] - }, - "id": 0, - "name": " as std::slice::SliceIndex<[i32]>>::index" - } - }, - "symbol_name": "_ZN106_$LT$core..ops..range..Range$LT$usize$GT$$u20$as$u20$core..slice..index..SliceIndex$LT$$u5b$T$u5d$$GT$$GT$5index17h" - }, - { - "details": null, - "mono_item_kind": { - "MonoItemFn": { - "body": { - "arg_count": 4, - "blocks": [ - { - "statements": [ - { - "kind": { - "StorageLive": 5 - }, - "span": 43 - }, - { - "kind": { - "StorageLive": 6 - }, - "span": 44 - }, - { - "kind": { - "StorageLive": 8 - }, - "span": 45 - }, - { - "kind": { - "Assign": [ - { - "local": 8, - "projection": [] - }, - { - "Aggregate": [ - { - "Closure": [ - 3, - [ - { - "Type": 12 - }, - { - "Type": 13 - }, - { - "Type": 14 - }, - { - "Type": 15 - } - ] - ] - }, - [ - { - "Copy": { - "local": 1, - "projection": [] - } - } - ] - ] - } - ] - }, - "span": 45 - }, + }, + { + "argument_index": null, + "composite": null, + "name": "b", + "source_info": { + "scope": 2 + }, + "value": { + "Place": { + "local": 2, + "projection": [] + } + } + } + ] + }, + "name": "main" + } + }, + "symbol_name": "_ZN5slice4main17h" + }, + { + "details": null, + "mono_item_kind": { + "MonoItemFn": { + "body": { + "arg_count": 2, + "blocks": [ + { + "statements": [ { "kind": { - "Assign": [ - { - "local": 7, - "projection": [] - }, - { - "Ref": [ - { - "kind": "ReErased" - }, - "Shared", - { - "local": 8, - "projection": [] - } - ] - } - ] - }, - "span": 44 + "StorageLive": 3 + } }, { "kind": { "Assign": [ { - "local": 6, + "local": 3, "projection": [] }, { "Cast": [ - { - "PointerCoercion": "Unsize" - }, + "Transmute", { "Copy": { - "local": 7, + "local": 2, "projection": [] } }, - 16 + 0 ] } ] - }, - "span": 44 + } } ], "terminator": { @@ -4136,13 +3717,7 @@ "args": [ { "Move": { - "local": 6, - "projection": [] - } - }, - { - "Move": { - "local": 2, + "local": 1, "projection": [] } }, @@ -4151,139 +3726,61 @@ "local": 3, "projection": [] } - }, - { - "Move": { - "local": 4, - "projection": [] - } } ], "destination": { - "local": 5, + "local": 0, "projection": [] }, "func": { "Constant": { "const_": { - "id": 2, "kind": "ZeroSized" }, - "span": 42, "user_ty": null } }, "target": 1, - "unwind": "Continue" + "unwind": "Unreachable" } - }, - "span": 43 + } } }, { "statements": [ { "kind": { - "StorageDead": 6 - }, - "span": 47 - }, - { - "kind": { - "Assign": [ - { - "local": 0, - "projection": [] - }, - { - "Use": { - "Copy": { - "local": 5, - "projection": [ - { - "Downcast": 0 - }, - { - "Field": [ - 0, - 17 - ] - } - ] - } - } - } - ] - }, - "span": 48 - }, - { - "kind": { - "StorageDead": 8 - }, - "span": 49 - }, - { - "kind": { - "StorageDead": 5 - }, - "span": 49 + "StorageDead": 3 + } } ], "terminator": { - "kind": "Return", - "span": 46 + "kind": "Return" } } ], "locals": [ { - "mutability": "Mut", - "span": 50 - }, - { - "mutability": "Not", - "span": 51 - }, - { - "mutability": "Not", - "span": 52 - }, - { - "mutability": "Not", - "span": 53 - }, - { - "mutability": "Not", - "span": 54 - }, - { - "mutability": "Mut", - "span": 43 + "mutability": "Mut" }, { - "mutability": "Mut", - "span": 44 + "mutability": "Not" }, { - "mutability": "Not", - "span": 44 + "mutability": "Not" }, { - "mutability": "Not", - "span": 45 + "mutability": "Mut" } ], - "span": 55, "spread_arg": null, "var_debug_info": [ { "argument_index": 1, "composite": null, - "name": "main", + "name": "a", "source_info": { - "scope": 0, - "span": 51 + "scope": 0 }, "value": { "Place": { @@ -4295,10 +3792,9 @@ { "argument_index": 2, "composite": null, - "name": "argc", + "name": "b", "source_info": { - "scope": 0, - "span": 52 + "scope": 0 }, "value": { "Place": { @@ -4306,59 +3802,13 @@ "projection": [] } } - }, - { - "argument_index": 3, - "composite": null, - "name": "argv", - "source_info": { - "scope": 0, - "span": 53 - }, - "value": { - "Place": { - "local": 3, - "projection": [] - } - } - }, - { - "argument_index": 4, - "composite": null, - "name": "sigpipe", - "source_info": { - "scope": 0, - "span": 54 - }, - "value": { - "Place": { - "local": 4, - "projection": [] - } - } - }, - { - "argument_index": null, - "composite": null, - "name": "v", - "source_info": { - "scope": 1, - "span": 48 - }, - "value": { - "Place": { - "local": 0, - "projection": [] - } - } } ] }, - "id": 2, - "name": "std::rt::lang_start::<()>" + "name": ">::spec_eq" } }, - "symbol_name": "_ZN3std2rt10lang_start17h" + "symbol_name": "_ZN69_$LT$T$u20$as$u20$core..array..equality..SpecArrayEq$LT$U$C$_$GT$$GT$7spec_eq17h" } ], "types": [ @@ -4801,54 +4251,6 @@ } } ], - [ - { - "EnumType": { - "discriminants": [ - 0, - 1 - ], - "fields": "elided", - "layout": { - "abi": { - "Scalar": { - "Initialized": { - "valid_range": { - "end": 18446744073709551615, - "start": 0 - }, - "value": { - "Int": { - "length": "I64", - "signed": true - } - } - } - } - }, - "abi_align": 8, - "fields": { - "Arbitrary": { - "offsets": [ - { - "num_bits": 0 - } - ] - } - }, - "size": { - "num_bits": 64 - }, - "variants": { - "Single": { - "index": 0 - } - } - }, - "name": "std::result::Result" - } - } - ], [ { "StructType": { @@ -5660,39 +5062,6 @@ } } ], - [ - { - "RefType": { - "layout": { - "abi": { - "Scalar": { - "Initialized": { - "valid_range": { - "end": 18446744073709551615, - "start": 1 - }, - "value": { - "Pointer": 0 - } - } - } - }, - "abi_align": 8, - "fields": "Primitive", - "size": { - "num_bits": 64 - }, - "variants": { - "Single": { - "index": 0 - } - } - }, - "mutability": "Not", - "pointee_type": "elided" - } - } - ], [ { "RefType": { diff --git a/tests/integration/programs/static-vtable-nonbuiltin-deref.smir.json.expected b/tests/integration/expected/nightly-2025-03-01/static-vtable-nonbuiltin-deref.smir.json.expected similarity index 83% rename from tests/integration/programs/static-vtable-nonbuiltin-deref.smir.json.expected rename to tests/integration/expected/nightly-2025-03-01/static-vtable-nonbuiltin-deref.smir.json.expected index eb801b9b..e5ca6777 100644 --- a/tests/integration/programs/static-vtable-nonbuiltin-deref.smir.json.expected +++ b/tests/integration/expected/nightly-2025-03-01/static-vtable-nonbuiltin-deref.smir.json.expected @@ -8,7 +8,7 @@ { "global_alloc": { "VTable": [ - 9, + 0, { "bound_vars": [], "value": { @@ -87,6 +87,25 @@ ] ], "items": [ + { + "details": null, + "mono_item_kind": { + "MonoItemStatic": { + "allocation": { + "align": 1, + "bytes": [ + 7 + ], + "mutability": "Not", + "provenance": { + "ptrs": [] + } + }, + "name": "S" + } + }, + "symbol_name": "_ZN30static_vtable_nonbuiltin_deref1S17h" + }, { "details": null, "mono_item_kind": { @@ -107,7 +126,6 @@ "Use": { "Constant": { "const_": { - "id": 16, "kind": { "Allocated": { "align": 8, @@ -145,14 +163,12 @@ } } }, - "span": 79, "user_ty": null } } } ] - }, - "span": 79 + } }, { "kind": { @@ -165,7 +181,6 @@ "Use": { "Constant": { "const_": { - "id": 17, "kind": { "Allocated": { "align": 8, @@ -186,14 +201,12 @@ } } }, - "span": 80, "user_ty": null } } } ] - }, - "span": 80 + } }, { "kind": { @@ -202,47 +215,6 @@ "local": 5, "projection": [] }, - { - "Use": { - "Constant": { - "const_": { - "id": 18, - "kind": { - "Allocated": { - "align": 8, - "bytes": [ - 1, - 0, - 0, - 0, - 0, - 0, - 0, - 0 - ], - "mutability": "Mut", - "provenance": { - "ptrs": [] - } - } - } - }, - "span": 32, - "user_ty": null - } - } - } - ] - }, - "span": 78 - }, - { - "kind": { - "Assign": [ - { - "local": 6, - "projection": [] - }, { "BinaryOp": [ "Lt", @@ -253,16 +225,35 @@ } }, { - "Copy": { - "local": 5, - "projection": [] + "Constant": { + "const_": { + "kind": { + "Allocated": { + "align": 8, + "bytes": [ + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "mutability": "Mut", + "provenance": { + "ptrs": [] + } + } + } + }, + "user_ty": null } } ] } ] - }, - "span": 78 + } } ], "terminator": { @@ -270,7 +261,7 @@ "Assert": { "cond": { "Move": { - "local": 6, + "local": 5, "projection": [] } }, @@ -284,9 +275,29 @@ } }, "len": { - "Move": { - "local": 5, - "projection": [] + "Constant": { + "const_": { + "kind": { + "Allocated": { + "align": 8, + "bytes": [ + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "mutability": "Mut", + "provenance": { + "ptrs": [] + } + } + } + }, + "user_ty": null } } } @@ -294,8 +305,7 @@ "target": 1, "unwind": "Continue" } - }, - "span": 78 + } } }, { @@ -320,8 +330,7 @@ } } ] - }, - "span": 78 + } } ], "terminator": { @@ -342,63 +351,47 @@ "func": { "Constant": { "const_": { - "id": 19, "kind": "ZeroSized" }, - "span": 81, "user_ty": null } }, "target": 2, "unwind": "Continue" } - }, - "span": 82 + } } }, { "statements": [], "terminator": { - "kind": "Return", - "span": 83 + "kind": "Return" } } ], "locals": [ { - "mutability": "Mut", - "span": 84 - }, - { - "mutability": "Not", - "span": 82 + "mutability": "Mut" }, { - "mutability": "Mut", - "span": 78 + "mutability": "Not" }, { - "mutability": "Mut", - "span": 79 + "mutability": "Mut" }, { - "mutability": "Not", - "span": 80 + "mutability": "Mut" }, { - "mutability": "Mut", - "span": 78 + "mutability": "Not" }, { - "mutability": "Mut", - "span": 78 + "mutability": "Mut" } ], - "span": 85, "spread_arg": null, "var_debug_info": [] }, - "id": 9, "name": "main" } }, @@ -409,148 +402,134 @@ "mono_item_kind": { "MonoItemFn": { "body": { - "arg_count": 1, - "blocks": [ - { - "statements": [], - "terminator": { - "kind": "Return", - "span": 66 - } - } - ], - "locals": [ - { - "mutability": "Mut", - "span": 66 - }, - { - "mutability": "Not", - "span": 66 - } - ], - "span": 66, - "spread_arg": null, - "var_debug_info": [] - }, - "id": 6, - "name": "std::ptr::drop_in_place::<{closure@std::rt::lang_start<()>::{closure#0}}>" - } - }, - "symbol_name": "_ZN4core3ptr85drop_in_place$LT$std..rt..lang_start$LT$$LP$$RP$$GT$..$u7b$$u7b$closure$u7d$$u7d$$GT$17h" - }, - { - "details": null, - "mono_item_kind": { - "MonoItemFn": { - "body": { - "arg_count": 1, + "arg_count": 4, "blocks": [ { - "statements": [], + "statements": [ + { + "kind": { + "StorageLive": 5 + } + }, + { + "kind": { + "StorageLive": 7 + } + }, + { + "kind": { + "Assign": [ + { + "local": 7, + "projection": [] + }, + { + "Aggregate": [ + { + "Closure": [ + 0, + [ + { + "Type": 0 + }, + { + "Type": 0 + }, + { + "Type": 0 + }, + { + "Type": 0 + } + ] + ] + }, + [ + { + "Copy": { + "local": 1, + "projection": [] + } + } + ] + ] + } + ] + } + }, + { + "kind": { + "Assign": [ + { + "local": 6, + "projection": [] + }, + { + "Ref": [ + { + "kind": "ReErased" + }, + "Shared", + { + "local": 7, + "projection": [] + } + ] + } + ] + } + }, + { + "kind": { + "Assign": [ + { + "local": 5, + "projection": [] + }, + { + "Cast": [ + { + "PointerCoercion": "Unsize" + }, + { + "Copy": { + "local": 6, + "projection": [] + } + }, + 0 + ] + } + ] + } + } + ], "terminator": { "kind": { "Call": { "args": [ { "Move": { - "local": 1, + "local": 5, "projection": [] } - } - ], - "destination": { - "local": 0, - "projection": [] - }, - "func": { - "Constant": { - "const_": { - "id": 13, - "kind": "ZeroSized" - }, - "span": 34, - "user_ty": null - } - }, - "target": 1, - "unwind": "Unreachable" - } - }, - "span": 35 - } - }, - { - "statements": [], - "terminator": { - "kind": "Return", - "span": 67 - } - } - ], - "locals": [ - { - "mutability": "Mut", - "span": 68 - }, - { - "mutability": "Not", - "span": 41 - } - ], - "span": 69, - "spread_arg": null, - "var_debug_info": [ - { - "argument_index": 1, - "composite": null, - "name": "dummy", - "source_info": { - "scope": 0, - "span": 41 - }, - "value": { - "Place": { - "local": 1, - "projection": [] - } - } - } - ] - }, - "id": 7, - "name": "std::hint::black_box::<&dyn std::fmt::Debug>" - } - }, - "symbol_name": "_ZN4core4hint9black_box17h" - }, - { - "details": null, - "mono_item_kind": { - "MonoItemFn": { - "body": { - "arg_count": 1, - "blocks": [ - { - "statements": [], - "terminator": { - "kind": { - "Call": { - "args": [ + }, { "Move": { - "local": 1, + "local": 2, "projection": [] } }, { - "Constant": { - "const_": { - "id": 4, - "kind": "ZeroSized" - }, - "span": 32, - "user_ty": null + "Move": { + "local": 3, + "projection": [] + } + }, + { + "Move": { + "local": 4, + "projection": [] } } ], @@ -561,90 +540,69 @@ "func": { "Constant": { "const_": { - "id": 3, "kind": "ZeroSized" }, - "span": 31, "user_ty": null } }, "target": 1, "unwind": "Continue" } - }, - "span": 33 + } } }, { - "statements": [], - "terminator": { - "kind": { - "Call": { - "args": [ - { - "Constant": { - "const_": { - "id": 4, - "kind": "ZeroSized" - }, - "span": 32, - "user_ty": null - } - } - ], - "destination": { - "local": 2, - "projection": [] - }, - "func": { - "Constant": { - "const_": { - "id": 5, - "kind": "ZeroSized" - }, - "span": 34, - "user_ty": null - } - }, - "target": 2, - "unwind": "Unreachable" + "statements": [ + { + "kind": { + "StorageDead": 5 } }, - "span": 35 - } - }, - { - "statements": [], + { + "kind": { + "StorageDead": 7 + } + } + ], "terminator": { - "kind": "Return", - "span": 36 + "kind": "Return" } } ], "locals": [ { - "mutability": "Mut", - "span": 37 + "mutability": "Mut" + }, + { + "mutability": "Not" + }, + { + "mutability": "Not" + }, + { + "mutability": "Not" }, { - "mutability": "Not", - "span": 38 + "mutability": "Not" }, { - "mutability": "Not", - "span": 39 + "mutability": "Mut" + }, + { + "mutability": "Not" + }, + { + "mutability": "Not" } ], - "span": 42, "spread_arg": null, "var_debug_info": [ { "argument_index": 1, "composite": null, - "name": "f", + "name": "main", "source_info": { - "scope": 0, - "span": 38 + "scope": 0 }, "value": { "Place": { @@ -654,136 +612,53 @@ } }, { - "argument_index": null, + "argument_index": 2, "composite": null, - "name": "result", + "name": "argc", "source_info": { - "scope": 1, - "span": 40 + "scope": 0 }, "value": { "Place": { - "local": 0, + "local": 2, "projection": [] } } }, { - "argument_index": 1, + "argument_index": 3, "composite": null, - "name": "dummy", + "name": "argv", "source_info": { - "scope": 2, - "span": 41 + "scope": 0 }, "value": { - "Const": { - "const_": { - "id": 4, - "kind": "ZeroSized" - }, - "span": 32, - "user_ty": null - } - } - } - ] - }, - "id": 3, - "name": "std::sys::backtrace::__rust_begin_short_backtrace::" - } - }, - "symbol_name": "_ZN3std3sys9backtrace28__rust_begin_short_backtrace17h" - }, - { - "details": null, - "mono_item_kind": { - "MonoItemFn": { - "body": { - "arg_count": 1, - "blocks": [ - { - "statements": [ - { - "kind": { - "Assign": [ - { - "local": 0, - "projection": [] - }, - { - "Use": { - "Constant": { - "const_": { - "id": 14, - "kind": { - "Allocated": { - "align": 1, - "bytes": [ - 0 - ], - "mutability": "Mut", - "provenance": { - "ptrs": [] - } - } - } - }, - "span": 71, - "user_ty": null - } - } - } - ] - }, - "span": 71 + "Place": { + "local": 3, + "projection": [] } - ], - "terminator": { - "kind": "Return", - "span": 70 } - } - ], - "locals": [ - { - "mutability": "Mut", - "span": 72 }, { - "mutability": "Not", - "span": 73 - } - ], - "span": 74, - "spread_arg": null, - "var_debug_info": [ - { - "argument_index": 1, + "argument_index": 4, "composite": null, - "name": "self", + "name": "sigpipe", "source_info": { - "scope": 0, - "span": 73 + "scope": 0 }, "value": { - "Const": { - "const_": { - "id": 4, - "kind": "ZeroSized" - }, - "span": 32, - "user_ty": null + "Place": { + "local": 4, + "projection": [] } } } ] }, - "id": 8, - "name": "<() as std::process::Termination>::report" + "name": "std::rt::lang_start::<()>" } }, - "symbol_name": "_ZN54_$LT$$LP$$RP$$u20$as$u20$std..process..Termination$GT$6report17h" + "symbol_name": "_ZN3std2rt10lang_start17h" }, { "details": null, @@ -797,20 +672,17 @@ { "kind": { "StorageLive": 2 - }, - "span": 16 + } }, { "kind": { "StorageLive": 3 - }, - "span": 15 + } }, { "kind": { "StorageLive": 4 - }, - "span": 17 + } }, { "kind": { @@ -828,7 +700,7 @@ { "Field": [ 0, - 7 + 0 ] } ] @@ -836,8 +708,7 @@ } } ] - }, - "span": 17 + } } ], "terminator": { @@ -858,18 +729,15 @@ "func": { "Constant": { "const_": { - "id": 1, "kind": "ZeroSized" }, - "span": 14, "user_ty": null } }, "target": 1, "unwind": "Continue" } - }, - "span": 15 + } } }, { @@ -877,8 +745,7 @@ { "kind": { "StorageDead": 4 - }, - "span": 19 + } } ], "terminator": { @@ -899,18 +766,15 @@ "func": { "Constant": { "const_": { - "id": 2, "kind": "ZeroSized" }, - "span": 18, "user_ty": null } }, "target": 2, "unwind": "Continue" } - }, - "span": 16 + } } }, { @@ -918,14 +782,12 @@ { "kind": { "StorageDead": 3 - }, - "span": 21 + } }, { "kind": { "StorageLive": 5 - }, - "span": 22 + } }, { "kind": { @@ -935,65 +797,28 @@ "projection": [] }, { - "Ref": [ - { - "kind": "ReErased" - }, - "Shared", - { + "Use": { + "Copy": { "local": 2, "projection": [ { "Field": [ 0, - 15 + 0 + ] + }, + { + "Field": [ + 0, + 0 ] } ] } - ] + } } ] - }, - "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": { @@ -1007,73 +832,52 @@ "IntToInt", { "Move": { - "local": 6, + "local": 5, "projection": [] } }, - 16 + 0 ] } ] - }, - "span": 24 - }, - { - "kind": { - "StorageDead": 6 - }, - "span": 25 + } }, { "kind": { "StorageDead": 5 - }, - "span": 26 + } }, { "kind": { "StorageDead": 2 - }, - "span": 27 + } } ], "terminator": { - "kind": "Return", - "span": 20 + "kind": "Return" } } ], "locals": [ { - "mutability": "Mut", - "span": 28 - }, - { - "mutability": "Mut", - "span": 3 + "mutability": "Mut" }, { - "mutability": "Mut", - "span": 16 + "mutability": "Mut" }, { - "mutability": "Mut", - "span": 15 + "mutability": "Mut" }, { - "mutability": "Mut", - "span": 17 + "mutability": "Mut" }, { - "mutability": "Mut", - "span": 22 + "mutability": "Mut" }, { - "mutability": "Mut", - "span": 23 + "mutability": "Mut" } ], - "span": 3, "spread_arg": null, "var_debug_info": [ { @@ -1081,8 +885,7 @@ "composite": null, "name": "main", "source_info": { - "scope": 0, - "span": 9 + "scope": 0 }, "value": { "Place": { @@ -1092,7 +895,7 @@ { "Field": [ 0, - 7 + 0 ] } ] @@ -1104,8 +907,7 @@ "composite": null, "name": "self", "source_info": { - "scope": 1, - "span": 29 + "scope": 1 }, "value": { "Place": { @@ -1113,25 +915,9 @@ "projection": [] } } - }, - { - "argument_index": 1, - "composite": null, - "name": "self", - "source_info": { - "scope": 2, - "span": 30 - }, - "value": { - "Place": { - "local": 5, - "projection": [] - } - } } ] }, - "id": 2, "name": "std::rt::lang_start::<()>::{closure#0}" } }, @@ -1142,70 +928,47 @@ "mono_item_kind": { "MonoItemFn": { "body": { - "arg_count": 2, + "arg_count": 1, "blocks": [ { "statements": [], "terminator": { "kind": { "Call": { - "args": [], + "args": [ + { + "Move": { + "local": 1, + "projection": [] + } + }, + { + "Constant": { + "const_": { + "kind": "ZeroSized" + }, + "user_ty": null + } + } + ], "destination": { "local": 0, "projection": [] }, "func": { - "Move": { - "local": 1, - "projection": [] + "Constant": { + "const_": { + "kind": "ZeroSized" + }, + "user_ty": null } }, "target": 1, "unwind": "Continue" } - }, - "span": 65 - } - }, - { - "statements": [], - "terminator": { - "kind": "Return", - "span": 65 + } } - } - ], - "locals": [ - { - "mutability": "Mut", - "span": 65 - }, - { - "mutability": "Not", - "span": 65 }, - { - "mutability": "Not", - "span": 65 - } - ], - "span": 65, - "spread_arg": 2, - "var_debug_info": [] - }, - "id": 5, - "name": ">::call_once" - } - }, - "symbol_name": "_ZN4core3ops8function6FnOnce9call_once17h" - }, - { - "details": null, - "mono_item_kind": { - "MonoItemFn": { - "body": { - "arg_count": 2, - "blocks": [ { "statements": [], "terminator": { @@ -1213,72 +976,102 @@ "Call": { "args": [ { - "Move": { - "local": 1, - "projection": [ - "Deref" - ] - } - }, - { - "Move": { - "local": 2, - "projection": [] + "Constant": { + "const_": { + "kind": "ZeroSized" + }, + "user_ty": null } } ], "destination": { - "local": 0, + "local": 2, "projection": [] }, "func": { "Constant": { "const_": { - "id": 11, "kind": "ZeroSized" }, - "span": 65, "user_ty": null } }, - "target": 1, - "unwind": "Continue" + "target": 2, + "unwind": "Unreachable" } - }, - "span": 65 + } } }, { "statements": [], "terminator": { - "kind": "Return", - "span": 65 + "kind": "Return" } } ], "locals": [ { - "mutability": "Mut", - "span": 65 + "mutability": "Mut" }, { - "mutability": "Not", - "span": 65 + "mutability": "Not" }, { - "mutability": "Not", - "span": 65 + "mutability": "Not" } ], - "span": 65, - "spread_arg": 2, - "var_debug_info": [] + "spread_arg": null, + "var_debug_info": [ + { + "argument_index": 1, + "composite": null, + "name": "f", + "source_info": { + "scope": 0 + }, + "value": { + "Place": { + "local": 1, + "projection": [] + } + } + }, + { + "argument_index": null, + "composite": null, + "name": "result", + "source_info": { + "scope": 1 + }, + "value": { + "Place": { + "local": 0, + "projection": [] + } + } + }, + { + "argument_index": 1, + "composite": null, + "name": "dummy", + "source_info": { + "scope": 2 + }, + "value": { + "Const": { + "const_": { + "kind": "ZeroSized" + }, + "user_ty": null + } + } + } + ] }, - "id": 5, - "name": "<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once" + "name": "std::sys::backtrace::__rust_begin_short_backtrace::" } }, - "symbol_name": "_ZN4core3ops8function6FnOnce40call_once$u7b$$u7b$vtable.shim$u7d$$u7d$17h" + "symbol_name": "_ZN3std3sys9backtrace28__rust_begin_short_backtrace17h" }, { "details": null, @@ -1289,203 +1082,54 @@ "blocks": [ { "statements": [ + { + "kind": { + "StorageLive": 3 + } + }, + { + "kind": { + "StorageLive": 4 + } + }, { "kind": { "Assign": [ { - "local": 3, + "local": 4, "projection": [] }, { - "Ref": [ - { - "kind": "ReErased" - }, - { - "Mut": { - "kind": "Default" - } - }, - { - "local": 1, - "projection": [] + "Use": { + "Copy": { + "local": 2, + "projection": [ + "Deref", + { + "Field": [ + 0, + 0 + ] + }, + { + "Field": [ + 0, + 0 + ] + } + ] } - ] + } } ] - }, - "span": 65 - } - ], - "terminator": { - "kind": { - "Call": { - "args": [ + } + }, + { + "kind": { + "Assign": [ { - "Move": { - "local": 3, - "projection": [] - } - }, - { - "Move": { - "local": 2, - "projection": [] - } - } - ], - "destination": { - "local": 0, - "projection": [] - }, - "func": { - "Constant": { - "const_": { - "id": 12, - "kind": "ZeroSized" - }, - "span": 65, - "user_ty": null - } - }, - "target": 1, - "unwind": { - "Cleanup": 3 - } - } - }, - "span": 65 - } - }, - { - "statements": [], - "terminator": { - "kind": { - "Drop": { - "place": { - "local": 1, - "projection": [] - }, - "target": 2, - "unwind": "Continue" - } - }, - "span": 65 - } - }, - { - "statements": [], - "terminator": { - "kind": "Return", - "span": 65 - } - }, - { - "statements": [], - "terminator": { - "kind": { - "Drop": { - "place": { - "local": 1, - "projection": [] - }, - "target": 4, - "unwind": "Terminate" - } - }, - "span": 65 - } - }, - { - "statements": [], - "terminator": { - "kind": "Resume", - "span": 65 - } - } - ], - "locals": [ - { - "mutability": "Mut", - "span": 65 - }, - { - "mutability": "Not", - "span": 65 - }, - { - "mutability": "Not", - "span": 65 - }, - { - "mutability": "Not", - "span": 65 - } - ], - "span": 65, - "spread_arg": 2, - "var_debug_info": [] - }, - "id": 5, - "name": "<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once" - } - }, - "symbol_name": "_ZN4core3ops8function6FnOnce9call_once17h" - }, - { - "details": null, - "mono_item_kind": { - "MonoItemFn": { - "body": { - "arg_count": 2, - "blocks": [ - { - "statements": [ - { - "kind": { - "StorageLive": 3 - }, - "span": 44 - }, - { - "kind": { - "StorageLive": 4 - }, - "span": 45 - }, - { - "kind": { - "Assign": [ - { - "local": 4, - "projection": [] - }, - { - "Use": { - "Copy": { - "local": 2, - "projection": [ - "Deref", - { - "Field": [ - 0, - 21 - ] - } - ] - } - } - } - ] - }, - "span": 45 - }, - { - "kind": { - "Assign": [ - { - "local": 3, - "projection": [] + "local": 3, + "projection": [] }, { "BinaryOp": [ @@ -1499,7 +1143,6 @@ { "Constant": { "const_": { - "id": 6, "kind": { "Allocated": { "align": 4, @@ -1516,21 +1159,18 @@ } } }, - "span": 32, "user_ty": null } } ] } ] - }, - "span": 44 + } }, { "kind": { "StorageDead": 4 - }, - "span": 46 + } } ], "terminator": { @@ -1552,8 +1192,7 @@ "otherwise": 1 } } - }, - "span": 43 + } } }, { @@ -1561,8 +1200,7 @@ { "kind": { "StorageDead": 3 - }, - "span": 43 + } } ], "terminator": { @@ -1589,18 +1227,15 @@ "func": { "Constant": { "const_": { - "id": 7, "kind": "ZeroSized" }, - "span": 47, "user_ty": null } }, "target": 6, "unwind": "Continue" } - }, - "span": 48 + } } }, { @@ -1608,20 +1243,17 @@ { "kind": { "StorageDead": 3 - }, - "span": 43 + } }, { "kind": { "StorageLive": 5 - }, - "span": 50 + } }, { "kind": { "StorageLive": 6 - }, - "span": 51 + } }, { "kind": { @@ -1639,7 +1271,13 @@ { "Field": [ 0, - 21 + 0 + ] + }, + { + "Field": [ + 0, + 0 ] } ] @@ -1647,8 +1285,7 @@ } } ] - }, - "span": 51 + } }, { "kind": { @@ -1669,7 +1306,6 @@ { "Constant": { "const_": { - "id": 8, "kind": { "Allocated": { "align": 4, @@ -1686,21 +1322,18 @@ } } }, - "span": 32, "user_ty": null } } ] } ] - }, - "span": 50 + } }, { "kind": { "StorageDead": 6 - }, - "span": 52 + } } ], "terminator": { @@ -1722,8 +1355,7 @@ "otherwise": 3 } } - }, - "span": 49 + } } }, { @@ -1731,8 +1363,7 @@ { "kind": { "StorageDead": 5 - }, - "span": 49 + } } ], "terminator": { @@ -1759,18 +1390,15 @@ "func": { "Constant": { "const_": { - "id": 9, "kind": "ZeroSized" }, - "span": 53, "user_ty": null } }, "target": 5, "unwind": "Continue" } - }, - "span": 54 + } } }, { @@ -1778,8 +1406,7 @@ { "kind": { "StorageDead": 5 - }, - "span": 49 + } } ], "terminator": { @@ -1806,18 +1433,15 @@ "func": { "Constant": { "const_": { - "id": 10, "kind": "ZeroSized" }, - "span": 55, "user_ty": null } }, "target": 5, "unwind": "Continue" } - }, - "span": 56 + } } }, { @@ -1827,49 +1451,39 @@ "Goto": { "target": 6 } - }, - "span": 57 + } } }, { "statements": [], "terminator": { - "kind": "Return", - "span": 58 + "kind": "Return" } } ], "locals": [ { - "mutability": "Mut", - "span": 59 + "mutability": "Mut" }, { - "mutability": "Not", - "span": 60 + "mutability": "Not" }, { - "mutability": "Not", - "span": 61 + "mutability": "Not" }, { - "mutability": "Mut", - "span": 44 + "mutability": "Mut" }, { - "mutability": "Mut", - "span": 45 + "mutability": "Mut" }, { - "mutability": "Mut", - "span": 50 + "mutability": "Mut" }, { - "mutability": "Mut", - "span": 51 + "mutability": "Mut" } ], - "span": 64, "spread_arg": null, "var_debug_info": [ { @@ -1877,8 +1491,7 @@ "composite": null, "name": "self", "source_info": { - "scope": 0, - "span": 60 + "scope": 0 }, "value": { "Place": { @@ -1892,8 +1505,7 @@ "composite": null, "name": "f", "source_info": { - "scope": 0, - "span": 61 + "scope": 0 }, "value": { "Place": { @@ -1907,8 +1519,7 @@ "composite": null, "name": "self", "source_info": { - "scope": 1, - "span": 62 + "scope": 1 }, "value": { "Place": { @@ -1922,8 +1533,7 @@ "composite": null, "name": "self", "source_info": { - "scope": 2, - "span": 63 + "scope": 2 }, "value": { "Place": { @@ -1934,7 +1544,6 @@ } ] }, - "id": 4, "name": "core::fmt::num::::fmt" } }, @@ -1945,135 +1554,168 @@ "mono_item_kind": { "MonoItemFn": { "body": { - "arg_count": 4, + "arg_count": 2, "blocks": [ { - "statements": [ - { - "kind": { - "StorageLive": 5 - }, - "span": 1 - }, - { - "kind": { - "StorageLive": 6 - }, - "span": 2 - }, - { - "kind": { - "StorageLive": 8 - }, - "span": 3 - }, - { - "kind": { - "Assign": [ - { - "local": 8, - "projection": [] - }, + "statements": [], + "terminator": { + "kind": { + "Call": { + "args": [ { - "Aggregate": [ - { - "Closure": [ - 2, - [ - { - "Type": 1 - }, - { - "Type": 2 - }, - { - "Type": 3 - }, - { - "Type": 4 - } - ] - ] - }, - [ - { - "Copy": { - "local": 1, - "projection": [] - } - } + "Move": { + "local": 1, + "projection": [ + "Deref" ] - ] - } - ] - }, - "span": 3 - }, - { - "kind": { - "Assign": [ - { - "local": 7, - "projection": [] + } }, { - "Ref": [ - { - "kind": "ReErased" - }, - "Shared", - { - "local": 8, - "projection": [] - } - ] + "Move": { + "local": 2, + "projection": [] + } } - ] - }, - "span": 2 - }, - { - "kind": { + ], + "destination": { + "local": 0, + "projection": [] + }, + "func": { + "Constant": { + "const_": { + "kind": "ZeroSized" + }, + "user_ty": null + } + }, + "target": 1, + "unwind": "Continue" + } + } + } + }, + { + "statements": [], + "terminator": { + "kind": "Return" + } + } + ], + "locals": [ + { + "mutability": "Mut" + }, + { + "mutability": "Not" + }, + { + "mutability": "Not" + } + ], + "spread_arg": 2, + "var_debug_info": [] + }, + "name": "<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once" + } + }, + "symbol_name": "_ZN4core3ops8function6FnOnce40call_once$u7b$$u7b$vtable.shim$u7d$$u7d$17h" + }, + { + "details": null, + "mono_item_kind": { + "MonoItemFn": { + "body": { + "arg_count": 2, + "blocks": [ + { + "statements": [], + "terminator": { + "kind": { + "Call": { + "args": [], + "destination": { + "local": 0, + "projection": [] + }, + "func": { + "Move": { + "local": 1, + "projection": [] + } + }, + "target": 1, + "unwind": "Continue" + } + } + } + }, + { + "statements": [], + "terminator": { + "kind": "Return" + } + } + ], + "locals": [ + { + "mutability": "Mut" + }, + { + "mutability": "Not" + }, + { + "mutability": "Not" + } + ], + "spread_arg": 2, + "var_debug_info": [] + }, + "name": ">::call_once" + } + }, + "symbol_name": "_ZN4core3ops8function6FnOnce9call_once17h" + }, + { + "details": null, + "mono_item_kind": { + "MonoItemFn": { + "body": { + "arg_count": 2, + "blocks": [ + { + "statements": [ + { + "kind": { "Assign": [ { - "local": 6, + "local": 3, "projection": [] }, { - "Cast": [ + "Ref": [ { - "PointerCoercion": "Unsize" + "kind": "ReErased" }, { - "Copy": { - "local": 7, - "projection": [] + "Mut": { + "kind": "Default" } }, - 5 + { + "local": 1, + "projection": [] + } ] } ] - }, - "span": 2 + } } ], "terminator": { "kind": { "Call": { "args": [ - { - "Move": { - "local": 6, - "projection": [] - } - }, - { - "Move": { - "local": 2, - "projection": [] - } - }, { "Move": { "local": 3, @@ -2082,231 +1724,263 @@ }, { "Move": { - "local": 4, + "local": 2, "projection": [] } } ], "destination": { - "local": 5, + "local": 0, "projection": [] }, "func": { "Constant": { "const_": { - "id": 0, "kind": "ZeroSized" }, - "span": 0, "user_ty": null } }, "target": 1, + "unwind": { + "Cleanup": 3 + } + } + } + } + }, + { + "statements": [], + "terminator": { + "kind": { + "Drop": { + "place": { + "local": 1, + "projection": [] + }, + "target": 2, "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 + "statements": [], + "terminator": { + "kind": "Return" + } + }, + { + "statements": [], + "terminator": { + "kind": { + "Drop": { + "place": { + "local": 1, + "projection": [] + }, + "target": 4, + "unwind": "Terminate" + } } - ], + } + }, + { + "statements": [], "terminator": { - "kind": "Return", - "span": 4 + "kind": "Resume" } } ], "locals": [ { - "mutability": "Mut", - "span": 8 + "mutability": "Mut" }, { - "mutability": "Not", - "span": 9 + "mutability": "Not" }, { - "mutability": "Not", - "span": 10 + "mutability": "Not" }, { - "mutability": "Not", - "span": 11 - }, - { - "mutability": "Not", - "span": 12 - }, - { - "mutability": "Mut", - "span": 1 - }, + "mutability": "Not" + } + ], + "spread_arg": 2, + "var_debug_info": [] + }, + "name": "<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once" + } + }, + "symbol_name": "_ZN4core3ops8function6FnOnce9call_once17h" + }, + { + "details": null, + "mono_item_kind": { + "MonoItemFn": { + "body": { + "arg_count": 1, + "blocks": [ { - "mutability": "Mut", - "span": 2 - }, + "statements": [], + "terminator": { + "kind": "Return" + } + } + ], + "locals": [ { - "mutability": "Not", - "span": 2 + "mutability": "Mut" }, { - "mutability": "Not", - "span": 3 + "mutability": "Not" } ], - "span": 13, "spread_arg": null, - "var_debug_info": [ + "var_debug_info": [] + }, + "name": "std::ptr::drop_in_place::<{closure@std::rt::lang_start<()>::{closure#0}}>" + } + }, + "symbol_name": "_ZN4core3ptr85drop_in_place$LT$std..rt..lang_start$LT$$LP$$RP$$GT$..$u7b$$u7b$closure$u7d$$u7d$$GT$17h" + }, + { + "details": null, + "mono_item_kind": { + "MonoItemFn": { + "body": { + "arg_count": 1, + "blocks": [ { - "argument_index": 1, - "composite": null, - "name": "main", - "source_info": { - "scope": 0, - "span": 9 - }, - "value": { - "Place": { - "local": 1, - "projection": [] + "statements": [], + "terminator": { + "kind": { + "Call": { + "args": [ + { + "Move": { + "local": 1, + "projection": [] + } + } + ], + "destination": { + "local": 0, + "projection": [] + }, + "func": { + "Constant": { + "const_": { + "kind": "ZeroSized" + }, + "user_ty": null + } + }, + "target": 1, + "unwind": "Unreachable" + } } } }, { - "argument_index": 2, - "composite": null, - "name": "argc", - "source_info": { - "scope": 0, - "span": 10 - }, - "value": { - "Place": { - "local": 2, - "projection": [] - } + "statements": [], + "terminator": { + "kind": "Return" } - }, + } + ], + "locals": [ { - "argument_index": 3, - "composite": null, - "name": "argv", - "source_info": { - "scope": 0, - "span": 11 - }, - "value": { - "Place": { - "local": 3, - "projection": [] - } - } + "mutability": "Mut" }, { - "argument_index": 4, - "composite": null, - "name": "sigpipe", - "source_info": { - "scope": 0, - "span": 12 - }, - "value": { - "Place": { - "local": 4, - "projection": [] - } - } - }, + "mutability": "Not" + } + ], + "spread_arg": null, + "var_debug_info": [ { - "argument_index": null, + "argument_index": 1, "composite": null, - "name": "v", + "name": "dummy", "source_info": { - "scope": 1, - "span": 6 + "scope": 0 }, "value": { "Place": { - "local": 0, + "local": 1, "projection": [] } } } ] }, - "id": 1, - "name": "std::rt::lang_start::<()>" + "name": "std::hint::black_box::<&dyn std::fmt::Debug>" } }, - "symbol_name": "_ZN3std2rt10lang_start17h" + "symbol_name": "_ZN4core4hint9black_box17h" }, { "details": null, "mono_item_kind": { - "MonoItemStatic": { - "allocation": { - "align": 1, - "bytes": [ - 7 + "MonoItemFn": { + "body": { + "arg_count": 1, + "blocks": [ + { + "statements": [ + { + "kind": { + "Assign": [ + { + "local": 0, + "projection": [] + }, + { + "Use": { + "Constant": { + "const_": { + "kind": { + "Allocated": { + "align": 1, + "bytes": [ + 0 + ], + "mutability": "Mut", + "provenance": { + "ptrs": [] + } + } + } + }, + "user_ty": null + } + } + } + ] + } + } + ], + "terminator": { + "kind": "Return" + } + } ], - "mutability": "Not", - "provenance": { - "ptrs": [] - } + "locals": [ + { + "mutability": "Mut" + }, + { + "mutability": "Not" + } + ], + "spread_arg": null, + "var_debug_info": [] }, - "id": 0, - "name": "S" + "name": "<() as std::process::Termination>::report" } }, - "symbol_name": "_ZN30static_vtable_nonbuiltin_deref1S17h" + "symbol_name": "_ZN54_$LT$$LP$$RP$$u20$as$u20$std..process..Termination$GT$6report17h" } ], "types": [ @@ -2361,8 +2035,7 @@ "discriminants": [ 0, 1, - 2, - 3 + 2 ], "fields": "elided", "layout": { @@ -2370,7 +2043,7 @@ "Scalar": { "Initialized": { "valid_range": { - "end": 3, + "end": 2, "start": 0 }, "value": { @@ -2400,7 +2073,7 @@ "tag": { "Initialized": { "valid_range": { - "end": 3, + "end": 2, "start": 0 }, "value": { @@ -2476,7 +2149,81 @@ "index": 2 } } + } + ] + } + } + }, + "name": "std::fmt::Alignment" + } + } + ], + [ + { + "EnumType": { + "discriminants": [ + 0, + 1 + ], + "fields": "elided", + "layout": { + "abi": { + "Scalar": { + "Initialized": { + "valid_range": { + "end": 3, + "start": 0 }, + "value": { + "Int": { + "length": "I8", + "signed": false + } + } + } + } + }, + "abi_align": 1, + "fields": { + "Arbitrary": { + "offsets": [ + { + "num_bits": 0 + } + ] + } + }, + "size": { + "num_bits": 8 + }, + "variants": { + "Multiple": { + "tag": { + "Initialized": { + "valid_range": { + "end": 3, + "start": 0 + }, + "value": { + "Int": { + "length": "I8", + "signed": false + } + } + } + }, + "tag_encoding": { + "Niche": { + "niche_start": 3, + "niche_variants": { + "end": 0, + "start": 0 + }, + "untagged_variant": 1 + } + }, + "tag_field": 0, + "variants": [ { "abi": { "Aggregate": { @@ -2489,12 +2236,48 @@ "offsets": [] } }, + "size": { + "num_bits": 0 + }, + "variants": { + "Single": { + "index": 0 + } + } + }, + { + "abi": { + "Scalar": { + "Initialized": { + "valid_range": { + "end": 2, + "start": 0 + }, + "value": { + "Int": { + "length": "I8", + "signed": false + } + } + } + } + }, + "abi_align": 1, + "fields": { + "Arbitrary": { + "offsets": [ + { + "num_bits": 0 + } + ] + } + }, "size": { "num_bits": 8 }, "variants": { "Single": { - "index": 3 + "index": 1 } } } @@ -2502,7 +2285,7 @@ } } }, - "name": "core::fmt::rt::Alignment" + "name": "std::option::Option" } } ], @@ -2791,41 +2574,22 @@ ], [ { - "EnumType": { - "discriminants": [ - 0, - 1 - ], + "StructType": { "fields": "elided", "layout": { "abi": { - "Scalar": { - "Initialized": { - "valid_range": { - "end": 18446744073709551615, - "start": 0 - }, - "value": { - "Int": { - "length": "I64", - "signed": true - } - } - } + "Aggregate": { + "sized": true } }, - "abi_align": 8, + "abi_align": 1, "fields": { "Arbitrary": { - "offsets": [ - { - "num_bits": 0 - } - ] + "offsets": [] } }, "size": { - "num_bits": 64 + "num_bits": 0 }, "variants": { "Single": { @@ -2833,7 +2597,7 @@ } } }, - "name": "std::result::Result" + "name": "std::fmt::Error" } } ], @@ -2847,14 +2611,21 @@ "sized": true } }, - "abi_align": 1, + "abi_align": 8, "fields": { "Arbitrary": { - "offsets": [] + "offsets": [ + { + "num_bits": 0 + }, + { + "num_bits": 384 + } + ] } }, "size": { - "num_bits": 0 + "num_bits": 512 }, "variants": { "Single": { @@ -2862,7 +2633,7 @@ } } }, - "name": "std::fmt::Error" + "name": "std::fmt::Formatter<'_>" } } ], @@ -2881,28 +2652,25 @@ "Arbitrary": { "offsets": [ { - "num_bits": 416 + "num_bits": 288 }, { - "num_bits": 384 + "num_bits": 256 }, { - "num_bits": 448 + "num_bits": 320 }, { "num_bits": 0 }, { "num_bits": 128 - }, - { - "num_bits": 256 } ] } }, "size": { - "num_bits": 512 + "num_bits": 384 }, "variants": { "Single": { @@ -2910,7 +2678,7 @@ } } }, - "name": "std::fmt::Formatter<'_>" + "name": "std::fmt::FormattingOptions" } } ], @@ -3314,39 +3082,6 @@ } } ], - [ - { - "RefType": { - "layout": { - "abi": { - "Scalar": { - "Initialized": { - "valid_range": { - "end": 18446744073709551615, - "start": 1 - }, - "value": { - "Pointer": 0 - } - } - } - }, - "abi_align": 8, - "fields": "Primitive", - "size": { - "num_bits": 64 - }, - "variants": { - "Single": { - "index": 0 - } - } - }, - "mutability": "Not", - "pointee_type": "elided" - } - } - ], [ { "RefType": { diff --git a/tests/integration/programs/strange-ref-deref.smir.json.expected b/tests/integration/expected/nightly-2025-03-01/strange-ref-deref.smir.json.expected similarity index 78% rename from tests/integration/programs/strange-ref-deref.smir.json.expected rename to tests/integration/expected/nightly-2025-03-01/strange-ref-deref.smir.json.expected index f5316c53..3660fa2f 100644 --- a/tests/integration/programs/strange-ref-deref.smir.json.expected +++ b/tests/integration/expected/nightly-2025-03-01/strange-ref-deref.smir.json.expected @@ -108,7 +108,6 @@ "Use": { "Constant": { "const_": { - "id": 9, "kind": { "Allocated": { "align": 4, @@ -125,14 +124,12 @@ } } }, - "span": 51, "user_ty": null } } } ] - }, - "span": 51 + } }, { "kind": { @@ -154,8 +151,7 @@ ] } ] - }, - "span": 52 + } }, { "kind": { @@ -177,8 +173,7 @@ ] } ] - }, - "span": 53 + } }, { "kind": { @@ -196,8 +191,7 @@ } } ] - }, - "span": 53 + } }, { "kind": { @@ -215,8 +209,7 @@ } } ] - }, - "span": 54 + } }, { "kind": { @@ -236,8 +229,7 @@ } } ] - }, - "span": 55 + } } ], "terminator": { @@ -259,15 +251,13 @@ "otherwise": 2 } } - }, - "span": 50 + } } }, { "statements": [], "terminator": { - "kind": "Return", - "span": 56 + "kind": "Return" } }, { @@ -279,7 +269,6 @@ { "Constant": { "const_": { - "id": 11, "kind": { "Allocated": { "align": 8, @@ -313,7 +302,6 @@ } } }, - "span": 32, "user_ty": null } } @@ -325,52 +313,41 @@ "func": { "Constant": { "const_": { - "id": 10, "kind": "ZeroSized" }, - "span": 57, "user_ty": null } }, "target": null, "unwind": "Continue" } - }, - "span": 57 + } } } ], "locals": [ { - "mutability": "Mut", - "span": 58 + "mutability": "Mut" }, { - "mutability": "Not", - "span": 59 + "mutability": "Not" }, { - "mutability": "Mut", - "span": 60 + "mutability": "Mut" }, { - "mutability": "Not", - "span": 53 + "mutability": "Not" }, { - "mutability": "Mut", - "span": 55 + "mutability": "Mut" }, { - "mutability": "Mut", - "span": 57 + "mutability": "Mut" }, { - "mutability": "Mut", - "span": 53 + "mutability": "Mut" } ], - "span": 61, "spread_arg": null, "var_debug_info": [ { @@ -378,8 +355,7 @@ "composite": null, "name": "a", "source_info": { - "scope": 1, - "span": 59 + "scope": 1 }, "value": { "Place": { @@ -393,8 +369,7 @@ "composite": null, "name": "b", "source_info": { - "scope": 2, - "span": 60 + "scope": 2 }, "value": { "Place": { @@ -405,7 +380,6 @@ } ] }, - "id": 6, "name": "main" } }, @@ -416,63 +390,134 @@ "mono_item_kind": { "MonoItemFn": { "body": { - "arg_count": 1, - "blocks": [ - { - "statements": [], - "terminator": { - "kind": "Return", - "span": 44 - } - } - ], - "locals": [ - { - "mutability": "Mut", - "span": 44 - }, - { - "mutability": "Not", - "span": 44 - } - ], - "span": 44, - "spread_arg": null, - "var_debug_info": [] - }, - "id": 4, - "name": "std::ptr::drop_in_place::<{closure@std::rt::lang_start<()>::{closure#0}}>" - } - }, - "symbol_name": "_ZN4core3ptr85drop_in_place$LT$std..rt..lang_start$LT$$LP$$RP$$GT$..$u7b$$u7b$closure$u7d$$u7d$$GT$17h" - }, - { - "details": null, - "mono_item_kind": { - "MonoItemFn": { - "body": { - "arg_count": 1, + "arg_count": 4, "blocks": [ { - "statements": [], + "statements": [ + { + "kind": { + "StorageLive": 5 + } + }, + { + "kind": { + "StorageLive": 7 + } + }, + { + "kind": { + "Assign": [ + { + "local": 7, + "projection": [] + }, + { + "Aggregate": [ + { + "Closure": [ + 0, + [ + { + "Type": 0 + }, + { + "Type": 0 + }, + { + "Type": 0 + }, + { + "Type": 0 + } + ] + ] + }, + [ + { + "Copy": { + "local": 1, + "projection": [] + } + } + ] + ] + } + ] + } + }, + { + "kind": { + "Assign": [ + { + "local": 6, + "projection": [] + }, + { + "Ref": [ + { + "kind": "ReErased" + }, + "Shared", + { + "local": 7, + "projection": [] + } + ] + } + ] + } + }, + { + "kind": { + "Assign": [ + { + "local": 5, + "projection": [] + }, + { + "Cast": [ + { + "PointerCoercion": "Unsize" + }, + { + "Copy": { + "local": 6, + "projection": [] + } + }, + 0 + ] + } + ] + } + } + ], "terminator": { "kind": { "Call": { "args": [ { "Move": { - "local": 1, + "local": 5, "projection": [] } }, { - "Constant": { - "const_": { - "id": 4, - "kind": "ZeroSized" - }, - "span": 32, - "user_ty": null + "Move": { + "local": 2, + "projection": [] + } + }, + { + "Move": { + "local": 3, + "projection": [] + } + }, + { + "Move": { + "local": 4, + "projection": [] } } ], @@ -483,90 +528,69 @@ "func": { "Constant": { "const_": { - "id": 3, "kind": "ZeroSized" }, - "span": 31, "user_ty": null } }, "target": 1, "unwind": "Continue" } - }, - "span": 33 + } } }, { - "statements": [], - "terminator": { - "kind": { - "Call": { - "args": [ - { - "Constant": { - "const_": { - "id": 4, - "kind": "ZeroSized" - }, - "span": 32, - "user_ty": null - } - } - ], - "destination": { - "local": 2, - "projection": [] - }, - "func": { - "Constant": { - "const_": { - "id": 5, - "kind": "ZeroSized" - }, - "span": 34, - "user_ty": null - } - }, - "target": 2, - "unwind": "Unreachable" + "statements": [ + { + "kind": { + "StorageDead": 5 } }, - "span": 35 - } - }, - { - "statements": [], + { + "kind": { + "StorageDead": 7 + } + } + ], "terminator": { - "kind": "Return", - "span": 36 + "kind": "Return" } } ], "locals": [ { - "mutability": "Mut", - "span": 37 + "mutability": "Mut" + }, + { + "mutability": "Not" + }, + { + "mutability": "Not" + }, + { + "mutability": "Not" + }, + { + "mutability": "Not" + }, + { + "mutability": "Mut" }, { - "mutability": "Not", - "span": 38 + "mutability": "Not" }, { - "mutability": "Not", - "span": 39 + "mutability": "Not" } ], - "span": 42, "spread_arg": null, "var_debug_info": [ { "argument_index": 1, "composite": null, - "name": "f", + "name": "main", "source_info": { - "scope": 0, - "span": 38 + "scope": 0 }, "value": { "Place": { @@ -576,136 +600,53 @@ } }, { - "argument_index": null, + "argument_index": 2, "composite": null, - "name": "result", + "name": "argc", "source_info": { - "scope": 1, - "span": 40 + "scope": 0 }, "value": { "Place": { - "local": 0, + "local": 2, "projection": [] } } }, { - "argument_index": 1, + "argument_index": 3, "composite": null, - "name": "dummy", + "name": "argv", "source_info": { - "scope": 2, - "span": 41 + "scope": 0 }, "value": { - "Const": { - "const_": { - "id": 4, - "kind": "ZeroSized" - }, - "span": 32, - "user_ty": null + "Place": { + "local": 3, + "projection": [] + } + } + }, + { + "argument_index": 4, + "composite": null, + "name": "sigpipe", + "source_info": { + "scope": 0 + }, + "value": { + "Place": { + "local": 4, + "projection": [] } } } ] }, - "id": 2, - "name": "std::sys::backtrace::__rust_begin_short_backtrace::" + "name": "std::rt::lang_start::<()>" } }, - "symbol_name": "_ZN3std3sys9backtrace28__rust_begin_short_backtrace17h" - }, - { - "details": null, - "mono_item_kind": { - "MonoItemFn": { - "body": { - "arg_count": 1, - "blocks": [ - { - "statements": [ - { - "kind": { - "Assign": [ - { - "local": 0, - "projection": [] - }, - { - "Use": { - "Constant": { - "const_": { - "id": 8, - "kind": { - "Allocated": { - "align": 1, - "bytes": [ - 0 - ], - "mutability": "Mut", - "provenance": { - "ptrs": [] - } - } - } - }, - "span": 46, - "user_ty": null - } - } - } - ] - }, - "span": 46 - } - ], - "terminator": { - "kind": "Return", - "span": 45 - } - } - ], - "locals": [ - { - "mutability": "Mut", - "span": 47 - }, - { - "mutability": "Not", - "span": 48 - } - ], - "span": 49, - "spread_arg": null, - "var_debug_info": [ - { - "argument_index": 1, - "composite": null, - "name": "self", - "source_info": { - "scope": 0, - "span": 48 - }, - "value": { - "Const": { - "const_": { - "id": 4, - "kind": "ZeroSized" - }, - "span": 32, - "user_ty": null - } - } - } - ] - }, - "id": 5, - "name": "<() as std::process::Termination>::report" - } - }, - "symbol_name": "_ZN54_$LT$$LP$$RP$$u20$as$u20$std..process..Termination$GT$6report17h" + "symbol_name": "_ZN3std2rt10lang_start17h" }, { "details": null, @@ -719,20 +660,17 @@ { "kind": { "StorageLive": 2 - }, - "span": 16 + } }, { "kind": { "StorageLive": 3 - }, - "span": 15 + } }, { "kind": { "StorageLive": 4 - }, - "span": 17 + } }, { "kind": { @@ -750,7 +688,7 @@ { "Field": [ 0, - 7 + 0 ] } ] @@ -758,8 +696,7 @@ } } ] - }, - "span": 17 + } } ], "terminator": { @@ -780,18 +717,15 @@ "func": { "Constant": { "const_": { - "id": 1, "kind": "ZeroSized" }, - "span": 14, "user_ty": null } }, "target": 1, "unwind": "Continue" } - }, - "span": 15 + } } }, { @@ -799,8 +733,7 @@ { "kind": { "StorageDead": 4 - }, - "span": 19 + } } ], "terminator": { @@ -821,18 +754,15 @@ "func": { "Constant": { "const_": { - "id": 2, "kind": "ZeroSized" }, - "span": 18, "user_ty": null } }, "target": 2, "unwind": "Continue" } - }, - "span": 16 + } } }, { @@ -840,14 +770,12 @@ { "kind": { "StorageDead": 3 - }, - "span": 21 + } }, { "kind": { "StorageLive": 5 - }, - "span": 22 + } }, { "kind": { @@ -856,42 +784,6 @@ "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": { @@ -900,13 +792,13 @@ { "Field": [ 0, - 15 + 0 ] }, { "Field": [ 0, - 9 + 0 ] } ] @@ -914,8 +806,7 @@ } } ] - }, - "span": 23 + } }, { "kind": { @@ -929,73 +820,52 @@ "IntToInt", { "Move": { - "local": 6, + "local": 5, "projection": [] } }, - 16 + 0 ] } ] - }, - "span": 24 - }, - { - "kind": { - "StorageDead": 6 - }, - "span": 25 + } }, { "kind": { "StorageDead": 5 - }, - "span": 26 + } }, { "kind": { "StorageDead": 2 - }, - "span": 27 + } } ], "terminator": { - "kind": "Return", - "span": 20 + "kind": "Return" } } ], "locals": [ { - "mutability": "Mut", - "span": 28 - }, - { - "mutability": "Mut", - "span": 3 + "mutability": "Mut" }, { - "mutability": "Mut", - "span": 16 + "mutability": "Mut" }, { - "mutability": "Mut", - "span": 15 + "mutability": "Mut" }, { - "mutability": "Mut", - "span": 17 + "mutability": "Mut" }, { - "mutability": "Mut", - "span": 22 + "mutability": "Mut" }, { - "mutability": "Mut", - "span": 23 + "mutability": "Mut" } ], - "span": 3, "spread_arg": null, "var_debug_info": [ { @@ -1003,8 +873,7 @@ "composite": null, "name": "main", "source_info": { - "scope": 0, - "span": 9 + "scope": 0 }, "value": { "Place": { @@ -1014,7 +883,7 @@ { "Field": [ 0, - 7 + 0 ] } ] @@ -1026,8 +895,7 @@ "composite": null, "name": "self", "source_info": { - "scope": 1, - "span": 29 + "scope": 1 }, "value": { "Place": { @@ -1035,25 +903,9 @@ "projection": [] } } - }, - { - "argument_index": 1, - "composite": null, - "name": "self", - "source_info": { - "scope": 2, - "span": 30 - }, - "value": { - "Place": { - "local": 5, - "projection": [] - } - } } ] }, - "id": 1, "name": "std::rt::lang_start::<()>::{closure#0}" } }, @@ -1064,62 +916,150 @@ "mono_item_kind": { "MonoItemFn": { "body": { - "arg_count": 2, + "arg_count": 1, "blocks": [ { "statements": [], "terminator": { "kind": { "Call": { - "args": [], + "args": [ + { + "Move": { + "local": 1, + "projection": [] + } + }, + { + "Constant": { + "const_": { + "kind": "ZeroSized" + }, + "user_ty": null + } + } + ], "destination": { "local": 0, "projection": [] }, "func": { - "Move": { - "local": 1, - "projection": [] + "Constant": { + "const_": { + "kind": "ZeroSized" + }, + "user_ty": null } }, "target": 1, "unwind": "Continue" } - }, - "span": 43 + } + } + }, + { + "statements": [], + "terminator": { + "kind": { + "Call": { + "args": [ + { + "Constant": { + "const_": { + "kind": "ZeroSized" + }, + "user_ty": null + } + } + ], + "destination": { + "local": 2, + "projection": [] + }, + "func": { + "Constant": { + "const_": { + "kind": "ZeroSized" + }, + "user_ty": null + } + }, + "target": 2, + "unwind": "Unreachable" + } + } } }, { "statements": [], "terminator": { - "kind": "Return", - "span": 43 + "kind": "Return" } } ], "locals": [ { - "mutability": "Mut", - "span": 43 + "mutability": "Mut" }, { - "mutability": "Not", - "span": 43 + "mutability": "Not" }, { - "mutability": "Not", - "span": 43 + "mutability": "Not" } ], - "span": 43, - "spread_arg": 2, - "var_debug_info": [] + "spread_arg": null, + "var_debug_info": [ + { + "argument_index": 1, + "composite": null, + "name": "f", + "source_info": { + "scope": 0 + }, + "value": { + "Place": { + "local": 1, + "projection": [] + } + } + }, + { + "argument_index": null, + "composite": null, + "name": "result", + "source_info": { + "scope": 1 + }, + "value": { + "Place": { + "local": 0, + "projection": [] + } + } + }, + { + "argument_index": 1, + "composite": null, + "name": "dummy", + "source_info": { + "scope": 2 + }, + "value": { + "Const": { + "const_": { + "kind": "ZeroSized" + }, + "user_ty": null + } + } + } + ] }, - "id": 3, - "name": ">::call_once" + "name": "std::sys::backtrace::__rust_begin_short_backtrace::" } }, - "symbol_name": "_ZN4core3ops8function6FnOnce9call_once17h" + "symbol_name": "_ZN3std3sys9backtrace28__rust_begin_short_backtrace17h" }, { "details": null, @@ -1156,52 +1096,98 @@ "func": { "Constant": { "const_": { - "id": 6, "kind": "ZeroSized" }, - "span": 43, "user_ty": null } }, "target": 1, "unwind": "Continue" } - }, - "span": 43 + } } }, { "statements": [], "terminator": { - "kind": "Return", - "span": 43 + "kind": "Return" } } ], "locals": [ { - "mutability": "Mut", - "span": 43 + "mutability": "Mut" }, { - "mutability": "Not", - "span": 43 + "mutability": "Not" }, { - "mutability": "Not", - "span": 43 + "mutability": "Not" } ], - "span": 43, "spread_arg": 2, "var_debug_info": [] }, - "id": 3, "name": "<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once" } }, "symbol_name": "_ZN4core3ops8function6FnOnce40call_once$u7b$$u7b$vtable.shim$u7d$$u7d$17h" }, + { + "details": null, + "mono_item_kind": { + "MonoItemFn": { + "body": { + "arg_count": 2, + "blocks": [ + { + "statements": [], + "terminator": { + "kind": { + "Call": { + "args": [], + "destination": { + "local": 0, + "projection": [] + }, + "func": { + "Move": { + "local": 1, + "projection": [] + } + }, + "target": 1, + "unwind": "Continue" + } + } + } + }, + { + "statements": [], + "terminator": { + "kind": "Return" + } + } + ], + "locals": [ + { + "mutability": "Mut" + }, + { + "mutability": "Not" + }, + { + "mutability": "Not" + } + ], + "spread_arg": 2, + "var_debug_info": [] + }, + "name": ">::call_once" + } + }, + "symbol_name": "_ZN4core3ops8function6FnOnce9call_once17h" + }, { "details": null, "mono_item_kind": { @@ -1235,8 +1221,7 @@ ] } ] - }, - "span": 43 + } } ], "terminator": { @@ -1263,10 +1248,8 @@ "func": { "Constant": { "const_": { - "id": 7, "kind": "ZeroSized" }, - "span": 43, "user_ty": null } }, @@ -1275,8 +1258,7 @@ "Cleanup": 3 } } - }, - "span": 43 + } } }, { @@ -1291,15 +1273,13 @@ "target": 2, "unwind": "Continue" } - }, - "span": 43 + } } }, { "statements": [], "terminator": { - "kind": "Return", - "span": 43 + "kind": "Return" } }, { @@ -1314,222 +1294,77 @@ "target": 4, "unwind": "Terminate" } - }, - "span": 43 - } - }, - { - "statements": [], - "terminator": { - "kind": "Resume", - "span": 43 - } - } - ], - "locals": [ - { - "mutability": "Mut", - "span": 43 - }, - { - "mutability": "Not", - "span": 43 - }, - { - "mutability": "Not", - "span": 43 - }, - { - "mutability": "Not", - "span": 43 - } - ], - "span": 43, - "spread_arg": 2, - "var_debug_info": [] - }, - "id": 3, - "name": "<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once" - } - }, - "symbol_name": "_ZN4core3ops8function6FnOnce9call_once17h" - }, - { - "details": null, - "mono_item_kind": { - "MonoItemFn": { - "body": { - "arg_count": 4, - "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": { - "args": [ - { - "Move": { - "local": 6, - "projection": [] - } - }, - { - "Move": { - "local": 2, - "projection": [] - } - }, - { - "Move": { - "local": 3, - "projection": [] - } - }, - { - "Move": { - "local": 4, - "projection": [] - } - } - ], - "destination": { - "local": 5, - "projection": [] - }, - "func": { - "Constant": { - "const_": { - "id": 0, - "kind": "ZeroSized" - }, - "span": 0, - "user_ty": null - } - }, - "target": 1, - "unwind": "Continue" - } - }, - "span": 1 } }, + { + "statements": [], + "terminator": { + "kind": "Resume" + } + } + ], + "locals": [ + { + "mutability": "Mut" + }, + { + "mutability": "Not" + }, + { + "mutability": "Not" + }, + { + "mutability": "Not" + } + ], + "spread_arg": 2, + "var_debug_info": [] + }, + "name": "<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once" + } + }, + "symbol_name": "_ZN4core3ops8function6FnOnce9call_once17h" + }, + { + "details": null, + "mono_item_kind": { + "MonoItemFn": { + "body": { + "arg_count": 1, + "blocks": [ + { + "statements": [], + "terminator": { + "kind": "Return" + } + } + ], + "locals": [ + { + "mutability": "Mut" + }, + { + "mutability": "Not" + } + ], + "spread_arg": null, + "var_debug_info": [] + }, + "name": "std::ptr::drop_in_place::<{closure@std::rt::lang_start<()>::{closure#0}}>" + } + }, + "symbol_name": "_ZN4core3ptr85drop_in_place$LT$std..rt..lang_start$LT$$LP$$RP$$GT$..$u7b$$u7b$closure$u7d$$u7d$$GT$17h" + }, + { + "details": null, + "mono_item_kind": { + "MonoItemFn": { + "body": { + "arg_count": 1, + "blocks": [ { "statements": [ - { - "kind": { - "StorageDead": 6 - }, - "span": 5 - }, { "kind": { "Assign": [ @@ -1539,168 +1374,49 @@ }, { "Use": { - "Copy": { - "local": 5, - "projection": [ - { - "Downcast": 0 - }, - { - "Field": [ - 0, - 6 - ] + "Constant": { + "const_": { + "kind": { + "Allocated": { + "align": 1, + "bytes": [ + 0 + ], + "mutability": "Mut", + "provenance": { + "ptrs": [] + } + } } - ] + }, + "user_ty": null } } } ] - }, - "span": 6 - }, - { - "kind": { - "StorageDead": 8 - }, - "span": 7 - }, - { - "kind": { - "StorageDead": 5 - }, - "span": 7 + } } ], "terminator": { - "kind": "Return", - "span": 4 + "kind": "Return" } } ], "locals": [ { - "mutability": "Mut", - "span": 8 - }, - { - "mutability": "Not", - "span": 9 - }, - { - "mutability": "Not", - "span": 10 - }, - { - "mutability": "Not", - "span": 11 - }, - { - "mutability": "Not", - "span": 12 - }, - { - "mutability": "Mut", - "span": 1 - }, - { - "mutability": "Mut", - "span": 2 - }, - { - "mutability": "Not", - "span": 2 + "mutability": "Mut" }, { - "mutability": "Not", - "span": 3 + "mutability": "Not" } ], - "span": 13, "spread_arg": null, - "var_debug_info": [ - { - "argument_index": 1, - "composite": null, - "name": "main", - "source_info": { - "scope": 0, - "span": 9 - }, - "value": { - "Place": { - "local": 1, - "projection": [] - } - } - }, - { - "argument_index": 2, - "composite": null, - "name": "argc", - "source_info": { - "scope": 0, - "span": 10 - }, - "value": { - "Place": { - "local": 2, - "projection": [] - } - } - }, - { - "argument_index": 3, - "composite": null, - "name": "argv", - "source_info": { - "scope": 0, - "span": 11 - }, - "value": { - "Place": { - "local": 3, - "projection": [] - } - } - }, - { - "argument_index": 4, - "composite": null, - "name": "sigpipe", - "source_info": { - "scope": 0, - "span": 12 - }, - "value": { - "Place": { - "local": 4, - "projection": [] - } - } - }, - { - "argument_index": null, - "composite": null, - "name": "v", - "source_info": { - "scope": 1, - "span": 6 - }, - "value": { - "Place": { - "local": 0, - "projection": [] - } - } - } - ] + "var_debug_info": [] }, - "id": 0, - "name": "std::rt::lang_start::<()>" + "name": "<() as std::process::Termination>::report" } }, - "symbol_name": "_ZN3std2rt10lang_start17h" + "symbol_name": "_ZN54_$LT$$LP$$RP$$u20$as$u20$std..process..Termination$GT$6report17h" } ], "types": [ @@ -1737,54 +1453,6 @@ } } ], - [ - { - "EnumType": { - "discriminants": [ - 0, - 1 - ], - "fields": "elided", - "layout": { - "abi": { - "Scalar": { - "Initialized": { - "valid_range": { - "end": 18446744073709551615, - "start": 0 - }, - "value": { - "Int": { - "length": "I64", - "signed": true - } - } - } - } - }, - "abi_align": 8, - "fields": { - "Arbitrary": { - "offsets": [ - { - "num_bits": 0 - } - ] - } - }, - "size": { - "num_bits": 64 - }, - "variants": { - "Single": { - "index": 0 - } - } - }, - "name": "std::result::Result" - } - } - ], [ { "StructType": { @@ -2204,39 +1872,6 @@ } } ], - [ - { - "RefType": { - "layout": { - "abi": { - "Scalar": { - "Initialized": { - "valid_range": { - "end": 18446744073709551615, - "start": 1 - }, - "value": { - "Pointer": 0 - } - } - } - }, - "abi_align": 8, - "fields": "Primitive", - "size": { - "num_bits": 64 - }, - "variants": { - "Single": { - "index": 0 - } - } - }, - "mutability": "Not", - "pointee_type": "elided" - } - } - ], [ { "RefType": { diff --git a/tests/integration/programs/struct.smir.json.expected b/tests/integration/expected/nightly-2025-03-01/struct.smir.json.expected similarity index 79% rename from tests/integration/programs/struct.smir.json.expected rename to tests/integration/expected/nightly-2025-03-01/struct.smir.json.expected index a62354e5..fa2c8639 100644 --- a/tests/integration/programs/struct.smir.json.expected +++ b/tests/integration/expected/nightly-2025-03-01/struct.smir.json.expected @@ -99,109 +99,82 @@ "mono_item_kind": { "MonoItemFn": { "body": { - "arg_count": 0, + "arg_count": 4, "blocks": [ { "statements": [ + { + "kind": { + "StorageLive": 5 + } + }, + { + "kind": { + "StorageLive": 7 + } + }, { "kind": { "Assign": [ { - "local": 1, + "local": 7, "projection": [] }, { "Aggregate": [ { - "Adt": [ - 7, + "Closure": [ 0, - [], - null, - null + [ + { + "Type": 0 + }, + { + "Type": 0 + }, + { + "Type": 0 + }, + { + "Type": 0 + } + ] ] }, [ { - "Constant": { - "const_": { - "id": 9, - "kind": { - "Allocated": { - "align": 4, - "bytes": [ - 1, - 0, - 0, - 0 - ], - "mutability": "Mut", - "provenance": { - "ptrs": [] - } - } - } - }, - "span": 52, - "user_ty": null - } - }, - { - "Constant": { - "const_": { - "id": 10, - "kind": { - "Allocated": { - "align": 4, - "bytes": [ - 2, - 0, - 0, - 0 - ], - "mutability": "Mut", - "provenance": { - "ptrs": [] - } - } - } - }, - "span": 53, - "user_ty": null + "Copy": { + "local": 1, + "projection": [] } } ] ] } ] - }, - "span": 54 + } }, { "kind": { "Assign": [ { - "local": 4, + "local": 6, "projection": [] }, { - "Use": { - "Copy": { - "local": 1, - "projection": [ - { - "Field": [ - 0, - 26 - ] - } - ] + "Ref": [ + { + "kind": "ReErased" + }, + "Shared", + { + "local": 7, + "projection": [] } - } + ] } ] - }, - "span": 55 + } }, { "kind": { @@ -211,331 +184,122 @@ "projection": [] }, { - "CheckedBinaryOp": [ - "Add", + "Cast": [ + { + "PointerCoercion": "Unsize" + }, { "Copy": { - "local": 4, + "local": 6, "projection": [] } }, - { - "Constant": { - "const_": { - "id": 9, - "kind": { - "Allocated": { - "align": 4, - "bytes": [ - 1, - 0, - 0, - 0 - ], - "mutability": "Mut", - "provenance": { - "ptrs": [] - } - } - } - }, - "span": 50, - "user_ty": null - } - } + 0 ] } ] - }, - "span": 51 + } } ], "terminator": { "kind": { - "Assert": { - "cond": { - "Move": { - "local": 5, - "projection": [ - { - "Field": [ - 1, - 25 - ] - } - ] + "Call": { + "args": [ + { + "Move": { + "local": 5, + "projection": [] + } + }, + { + "Move": { + "local": 2, + "projection": [] + } + }, + { + "Move": { + "local": 3, + "projection": [] + } + }, + { + "Move": { + "local": 4, + "projection": [] + } } + ], + "destination": { + "local": 0, + "projection": [] }, - "expected": false, - "msg": { - "Overflow": [ - "Add", - { - "Move": { - "local": 4, - "projection": [] - } + "func": { + "Constant": { + "const_": { + "kind": "ZeroSized" }, - { - "Constant": { - "const_": { - "id": 9, - "kind": { - "Allocated": { - "align": 4, - "bytes": [ - 1, - 0, - 0, - 0 - ], - "mutability": "Mut", - "provenance": { - "ptrs": [] - } - } - } - }, - "span": 50, - "user_ty": null - } - } - ] + "user_ty": null + } }, "target": 1, "unwind": "Continue" } - }, - "span": 51 + } } }, { "statements": [ { "kind": { - "Assign": [ - { - "local": 3, - "projection": [] - }, - { - "Use": { - "Move": { - "local": 5, - "projection": [ - { - "Field": [ - 0, - 26 - ] - } - ] - } - } - } - ] - }, - "span": 51 - }, - { - "kind": { - "Assign": [ - { - "local": 6, - "projection": [] - }, - { - "Use": { - "Copy": { - "local": 1, - "projection": [ - { - "Field": [ - 1, - 26 - ] - } - ] - } - } - } - ] - }, - "span": 57 + "StorageDead": 5 + } }, { "kind": { - "Assign": [ - { - "local": 2, - "projection": [] - }, - { - "BinaryOp": [ - "Eq", - { - "Move": { - "local": 3, - "projection": [] - } - }, - { - "Move": { - "local": 6, - "projection": [] - } - } - ] - } - ] - }, - "span": 56 + "StorageDead": 7 + } } ], "terminator": { - "kind": { - "SwitchInt": { - "discr": { - "Move": { - "local": 2, - "projection": [] - } - }, - "targets": { - "branches": [ - [ - 0, - 3 - ] - ], - "otherwise": 2 - } - } - }, - "span": 56 - } - }, - { - "statements": [], - "terminator": { - "kind": "Return", - "span": 58 - } - }, - { - "statements": [], - "terminator": { - "kind": { - "Call": { - "args": [ - { - "Constant": { - "const_": { - "id": 12, - "kind": { - "Allocated": { - "align": 8, - "bytes": [ - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 32, - 0, - 0, - 0, - 0, - 0, - 0, - 0 - ], - "mutability": "Mut", - "provenance": { - "ptrs": [ - [ - 0, - 0 - ] - ] - } - } - } - }, - "span": 32, - "user_ty": null - } - } - ], - "destination": { - "local": 7, - "projection": [] - }, - "func": { - "Constant": { - "const_": { - "id": 11, - "kind": "ZeroSized" - }, - "span": 59, - "user_ty": null - } - }, - "target": null, - "unwind": "Continue" - } - }, - "span": 59 + "kind": "Return" } } ], "locals": [ { - "mutability": "Mut", - "span": 60 + "mutability": "Mut" }, { - "mutability": "Not", - "span": 61 + "mutability": "Not" }, { - "mutability": "Mut", - "span": 56 + "mutability": "Not" }, { - "mutability": "Mut", - "span": 51 + "mutability": "Not" }, { - "mutability": "Mut", - "span": 55 + "mutability": "Not" }, { - "mutability": "Mut", - "span": 51 + "mutability": "Mut" }, { - "mutability": "Mut", - "span": 57 + "mutability": "Not" }, { - "mutability": "Mut", - "span": 59 + "mutability": "Not" } ], - "span": 62, "spread_arg": null, "var_debug_info": [ { - "argument_index": null, + "argument_index": 1, "composite": null, - "name": "s", + "name": "main", "source_info": { - "scope": 1, - "span": 61 + "scope": 0 }, "value": { "Place": { @@ -543,49 +307,55 @@ "projection": [] } } - } - ] - }, - "id": 6, - "name": "main" - } - }, - "symbol_name": "_ZN6struct4main17h" - }, - { - "details": null, - "mono_item_kind": { - "MonoItemFn": { - "body": { - "arg_count": 1, - "blocks": [ + }, { - "statements": [], - "terminator": { - "kind": "Return", - "span": 44 + "argument_index": 2, + "composite": null, + "name": "argc", + "source_info": { + "scope": 0 + }, + "value": { + "Place": { + "local": 2, + "projection": [] + } } - } - ], - "locals": [ + }, { - "mutability": "Mut", - "span": 44 + "argument_index": 3, + "composite": null, + "name": "argv", + "source_info": { + "scope": 0 + }, + "value": { + "Place": { + "local": 3, + "projection": [] + } + } }, { - "mutability": "Not", - "span": 44 + "argument_index": 4, + "composite": null, + "name": "sigpipe", + "source_info": { + "scope": 0 + }, + "value": { + "Place": { + "local": 4, + "projection": [] + } + } } - ], - "span": 44, - "spread_arg": null, - "var_debug_info": [] + ] }, - "id": 4, - "name": "std::ptr::drop_in_place::<{closure@std::rt::lang_start<()>::{closure#0}}>" + "name": "std::rt::lang_start::<()>" } }, - "symbol_name": "_ZN4core3ptr85drop_in_place$LT$std..rt..lang_start$LT$$LP$$RP$$GT$..$u7b$$u7b$closure$u7d$$u7d$$GT$17h" + "symbol_name": "_ZN3std2rt10lang_start17h" }, { "details": null, @@ -595,63 +365,94 @@ "arg_count": 1, "blocks": [ { - "statements": [], + "statements": [ + { + "kind": { + "StorageLive": 2 + } + }, + { + "kind": { + "StorageLive": 3 + } + }, + { + "kind": { + "StorageLive": 4 + } + }, + { + "kind": { + "Assign": [ + { + "local": 4, + "projection": [] + }, + { + "Use": { + "Copy": { + "local": 1, + "projection": [ + "Deref", + { + "Field": [ + 0, + 0 + ] + } + ] + } + } + } + ] + } + } + ], "terminator": { "kind": { "Call": { "args": [ { "Move": { - "local": 1, + "local": 4, "projection": [] } - }, - { - "Constant": { - "const_": { - "id": 4, - "kind": "ZeroSized" - }, - "span": 32, - "user_ty": null - } } ], "destination": { - "local": 0, + "local": 3, "projection": [] }, "func": { "Constant": { "const_": { - "id": 3, "kind": "ZeroSized" }, - "span": 31, "user_ty": null } }, "target": 1, "unwind": "Continue" } - }, - "span": 33 + } } }, { - "statements": [], + "statements": [ + { + "kind": { + "StorageDead": 4 + } + } + ], "terminator": { "kind": { "Call": { "args": [ { - "Constant": { - "const_": { - "id": 4, - "kind": "ZeroSized" - }, - "span": 32, - "user_ty": null + "Move": { + "local": 3, + "projection": [] } } ], @@ -662,101 +463,162 @@ "func": { "Constant": { "const_": { - "id": 5, "kind": "ZeroSized" }, - "span": 34, "user_ty": null } }, "target": 2, - "unwind": "Unreachable" + "unwind": "Continue" } - }, - "span": 35 + } } }, { - "statements": [], + "statements": [ + { + "kind": { + "StorageDead": 3 + } + }, + { + "kind": { + "StorageLive": 5 + } + }, + { + "kind": { + "Assign": [ + { + "local": 5, + "projection": [] + }, + { + "Use": { + "Copy": { + "local": 2, + "projection": [ + { + "Field": [ + 0, + 0 + ] + }, + { + "Field": [ + 0, + 0 + ] + } + ] + } + } + } + ] + } + }, + { + "kind": { + "Assign": [ + { + "local": 0, + "projection": [] + }, + { + "Cast": [ + "IntToInt", + { + "Move": { + "local": 5, + "projection": [] + } + }, + 0 + ] + } + ] + } + }, + { + "kind": { + "StorageDead": 5 + } + }, + { + "kind": { + "StorageDead": 2 + } + } + ], "terminator": { - "kind": "Return", - "span": 36 + "kind": "Return" } } ], "locals": [ { - "mutability": "Mut", - "span": 37 + "mutability": "Mut" + }, + { + "mutability": "Mut" + }, + { + "mutability": "Mut" + }, + { + "mutability": "Mut" }, { - "mutability": "Not", - "span": 38 + "mutability": "Mut" }, { - "mutability": "Not", - "span": 39 + "mutability": "Mut" } ], - "span": 42, "spread_arg": null, "var_debug_info": [ { - "argument_index": 1, + "argument_index": null, "composite": null, - "name": "f", + "name": "main", "source_info": { - "scope": 0, - "span": 38 + "scope": 0 }, "value": { "Place": { "local": 1, - "projection": [] + "projection": [ + "Deref", + { + "Field": [ + 0, + 0 + ] + } + ] } } }, { - "argument_index": null, + "argument_index": 1, "composite": null, - "name": "result", + "name": "self", "source_info": { - "scope": 1, - "span": 40 + "scope": 1 }, "value": { "Place": { - "local": 0, + "local": 2, "projection": [] } } - }, - { - "argument_index": 1, - "composite": null, - "name": "dummy", - "source_info": { - "scope": 2, - "span": 41 - }, - "value": { - "Const": { - "const_": { - "id": 4, - "kind": "ZeroSized" - }, - "span": 32, - "user_ty": null - } - } } ] }, - "id": 2, - "name": "std::sys::backtrace::__rust_begin_short_backtrace::" + "name": "std::rt::lang_start::<()>::{closure#0}" } }, - "symbol_name": "_ZN3std3sys9backtrace28__rust_begin_short_backtrace17h" + "symbol_name": "_ZN3std2rt10lang_start28_$u7b$$u7b$closure$u7d$$u7d$17h" }, { "details": null, @@ -766,439 +628,219 @@ "arg_count": 1, "blocks": [ { - "statements": [ - { - "kind": { - "Assign": [ + "statements": [], + "terminator": { + "kind": { + "Call": { + "args": [ { - "local": 0, - "projection": [] + "Move": { + "local": 1, + "projection": [] + } }, { - "Use": { - "Constant": { - "const_": { - "id": 8, - "kind": { - "Allocated": { - "align": 1, - "bytes": [ - 0 - ], - "mutability": "Mut", - "provenance": { - "ptrs": [] - } - } - } - }, - "span": 46, - "user_ty": null - } + "Constant": { + "const_": { + "kind": "ZeroSized" + }, + "user_ty": null } } - ] - }, - "span": 46 + ], + "destination": { + "local": 0, + "projection": [] + }, + "func": { + "Constant": { + "const_": { + "kind": "ZeroSized" + }, + "user_ty": null + } + }, + "target": 1, + "unwind": "Continue" + } } - ], + } + }, + { + "statements": [], + "terminator": { + "kind": { + "Call": { + "args": [ + { + "Constant": { + "const_": { + "kind": "ZeroSized" + }, + "user_ty": null + } + } + ], + "destination": { + "local": 2, + "projection": [] + }, + "func": { + "Constant": { + "const_": { + "kind": "ZeroSized" + }, + "user_ty": null + } + }, + "target": 2, + "unwind": "Unreachable" + } + } + } + }, + { + "statements": [], "terminator": { - "kind": "Return", - "span": 45 + "kind": "Return" } } ], "locals": [ { - "mutability": "Mut", - "span": 47 + "mutability": "Mut" }, { - "mutability": "Not", - "span": 48 + "mutability": "Not" + }, + { + "mutability": "Not" } ], - "span": 49, "spread_arg": null, "var_debug_info": [ { "argument_index": 1, "composite": null, - "name": "self", + "name": "f", + "source_info": { + "scope": 0 + }, + "value": { + "Place": { + "local": 1, + "projection": [] + } + } + }, + { + "argument_index": null, + "composite": null, + "name": "result", + "source_info": { + "scope": 1 + }, + "value": { + "Place": { + "local": 0, + "projection": [] + } + } + }, + { + "argument_index": 1, + "composite": null, + "name": "dummy", "source_info": { - "scope": 0, - "span": 48 + "scope": 2 }, "value": { "Const": { "const_": { - "id": 4, "kind": "ZeroSized" }, - "span": 32, "user_ty": null } } } ] }, - "id": 5, - "name": "<() as std::process::Termination>::report" + "name": "std::sys::backtrace::__rust_begin_short_backtrace::" } }, - "symbol_name": "_ZN54_$LT$$LP$$RP$$u20$as$u20$std..process..Termination$GT$6report17h" + "symbol_name": "_ZN3std3sys9backtrace28__rust_begin_short_backtrace17h" }, { "details": null, "mono_item_kind": { "MonoItemFn": { "body": { - "arg_count": 1, + "arg_count": 2, "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 - } - ], + "statements": [], "terminator": { "kind": { "Call": { "args": [ { "Move": { - "local": 4, - "projection": [] + "local": 1, + "projection": [ + "Deref" + ] } - } - ], - "destination": { - "local": 3, - "projection": [] - }, - "func": { - "Constant": { - "const_": { - "id": 1, - "kind": "ZeroSized" - }, - "span": 14, - "user_ty": null - } - }, - "target": 1, - "unwind": "Continue" - } - }, - "span": 15 - } - }, - { - "statements": [ - { - "kind": { - "StorageDead": 4 - }, - "span": 19 - } - ], - "terminator": { - "kind": { - "Call": { - "args": [ + }, { "Move": { - "local": 3, + "local": 2, "projection": [] } } ], "destination": { - "local": 2, + "local": 0, "projection": [] }, "func": { "Constant": { "const_": { - "id": 2, "kind": "ZeroSized" }, - "span": 18, "user_ty": null } }, - "target": 2, + "target": 1, "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 - } - ], + "statements": [], "terminator": { - "kind": "Return", - "span": 20 + "kind": "Return" } } ], "locals": [ { - "mutability": "Mut", - "span": 28 - }, - { - "mutability": "Mut", - "span": 3 - }, - { - "mutability": "Mut", - "span": 16 - }, - { - "mutability": "Mut", - "span": 15 - }, - { - "mutability": "Mut", - "span": 17 + "mutability": "Mut" }, { - "mutability": "Mut", - "span": 22 + "mutability": "Not" }, { - "mutability": "Mut", - "span": 23 + "mutability": "Not" } ], - "span": 3, - "spread_arg": null, - "var_debug_info": [ - { - "argument_index": null, - "composite": null, - "name": "main", - "source_info": { - "scope": 0, - "span": 9 - }, - "value": { - "Place": { - "local": 1, - "projection": [ - "Deref", - { - "Field": [ - 0, - 7 - ] - } - ] - } - } - }, - { - "argument_index": 1, - "composite": null, - "name": "self", - "source_info": { - "scope": 1, - "span": 29 - }, - "value": { - "Place": { - "local": 2, - "projection": [] - } - } - }, - { - "argument_index": 1, - "composite": null, - "name": "self", - "source_info": { - "scope": 2, - "span": 30 - }, - "value": { - "Place": { - "local": 5, - "projection": [] - } - } - } - ] + "spread_arg": 2, + "var_debug_info": [] }, - "id": 1, - "name": "std::rt::lang_start::<()>::{closure#0}" + "name": "<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once" } }, - "symbol_name": "_ZN3std2rt10lang_start28_$u7b$$u7b$closure$u7d$$u7d$17h" + "symbol_name": "_ZN4core3ops8function6FnOnce40call_once$u7b$$u7b$vtable.shim$u7d$$u7d$17h" }, { "details": null, @@ -1226,123 +868,35 @@ "target": 1, "unwind": "Continue" } - }, - "span": 43 + } } }, { "statements": [], "terminator": { - "kind": "Return", - "span": 43 + "kind": "Return" } } ], "locals": [ { - "mutability": "Mut", - "span": 43 + "mutability": "Mut" }, { - "mutability": "Not", - "span": 43 + "mutability": "Not" }, { - "mutability": "Not", - "span": 43 + "mutability": "Not" } ], - "span": 43, "spread_arg": 2, "var_debug_info": [] }, - "id": 3, "name": ">::call_once" } }, "symbol_name": "_ZN4core3ops8function6FnOnce9call_once17h" }, - { - "details": null, - "mono_item_kind": { - "MonoItemFn": { - "body": { - "arg_count": 2, - "blocks": [ - { - "statements": [], - "terminator": { - "kind": { - "Call": { - "args": [ - { - "Move": { - "local": 1, - "projection": [ - "Deref" - ] - } - }, - { - "Move": { - "local": 2, - "projection": [] - } - } - ], - "destination": { - "local": 0, - "projection": [] - }, - "func": { - "Constant": { - "const_": { - "id": 6, - "kind": "ZeroSized" - }, - "span": 43, - "user_ty": null - } - }, - "target": 1, - "unwind": "Continue" - } - }, - "span": 43 - } - }, - { - "statements": [], - "terminator": { - "kind": "Return", - "span": 43 - } - } - ], - "locals": [ - { - "mutability": "Mut", - "span": 43 - }, - { - "mutability": "Not", - "span": 43 - }, - { - "mutability": "Not", - "span": 43 - } - ], - "span": 43, - "spread_arg": 2, - "var_debug_info": [] - }, - "id": 3, - "name": "<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once" - } - }, - "symbol_name": "_ZN4core3ops8function6FnOnce40call_once$u7b$$u7b$vtable.shim$u7d$$u7d$17h" - }, { "details": null, "mono_item_kind": { @@ -1376,8 +930,7 @@ ] } ] - }, - "span": 43 + } } ], "terminator": { @@ -1404,10 +957,8 @@ "func": { "Constant": { "const_": { - "id": 7, "kind": "ZeroSized" }, - "span": 43, "user_ty": null } }, @@ -1416,8 +967,7 @@ "Cleanup": 3 } } - }, - "span": 43 + } } }, { @@ -1432,15 +982,13 @@ "target": 2, "unwind": "Continue" } - }, - "span": 43 + } } }, { "statements": [], "terminator": { - "kind": "Return", - "span": 43 + "kind": "Return" } }, { @@ -1455,41 +1003,33 @@ "target": 4, "unwind": "Terminate" } - }, - "span": 43 + } } }, { "statements": [], "terminator": { - "kind": "Resume", - "span": 43 + "kind": "Resume" } } ], "locals": [ { - "mutability": "Mut", - "span": 43 + "mutability": "Mut" }, { - "mutability": "Not", - "span": 43 + "mutability": "Not" }, { - "mutability": "Not", - "span": 43 + "mutability": "Not" }, { - "mutability": "Not", - "span": 43 + "mutability": "Not" } ], - "span": 43, "spread_arg": 2, "var_debug_info": [] }, - "id": 3, "name": "<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once" } }, @@ -1500,92 +1040,322 @@ "mono_item_kind": { "MonoItemFn": { "body": { - "arg_count": 4, + "arg_count": 1, + "blocks": [ + { + "statements": [], + "terminator": { + "kind": "Return" + } + } + ], + "locals": [ + { + "mutability": "Mut" + }, + { + "mutability": "Not" + } + ], + "spread_arg": null, + "var_debug_info": [] + }, + "name": "std::ptr::drop_in_place::<{closure@std::rt::lang_start<()>::{closure#0}}>" + } + }, + "symbol_name": "_ZN4core3ptr85drop_in_place$LT$std..rt..lang_start$LT$$LP$$RP$$GT$..$u7b$$u7b$closure$u7d$$u7d$$GT$17h" + }, + { + "details": null, + "mono_item_kind": { + "MonoItemFn": { + "body": { + "arg_count": 1, "blocks": [ { "statements": [ { "kind": { - "StorageLive": 5 - }, - "span": 1 - }, - { - "kind": { - "StorageLive": 6 - }, - "span": 2 - }, - { - "kind": { - "StorageLive": 8 - }, - "span": 3 - }, + "Assign": [ + { + "local": 0, + "projection": [] + }, + { + "Use": { + "Constant": { + "const_": { + "kind": { + "Allocated": { + "align": 1, + "bytes": [ + 0 + ], + "mutability": "Mut", + "provenance": { + "ptrs": [] + } + } + } + }, + "user_ty": null + } + } + } + ] + } + } + ], + "terminator": { + "kind": "Return" + } + } + ], + "locals": [ + { + "mutability": "Mut" + }, + { + "mutability": "Not" + } + ], + "spread_arg": null, + "var_debug_info": [] + }, + "name": "<() as std::process::Termination>::report" + } + }, + "symbol_name": "_ZN54_$LT$$LP$$RP$$u20$as$u20$std..process..Termination$GT$6report17h" + }, + { + "details": null, + "mono_item_kind": { + "MonoItemFn": { + "body": { + "arg_count": 0, + "blocks": [ + { + "statements": [ { "kind": { "Assign": [ { - "local": 8, + "local": 1, "projection": [] }, { "Aggregate": [ { - "Closure": [ - 1, - [ - { - "Type": 1 - }, - { - "Type": 2 - }, - { - "Type": 3 - }, - { - "Type": 4 - } - ] + "Adt": [ + 0, + 0, + [], + null, + null ] }, [ { - "Copy": { - "local": 1, - "projection": [] + "Constant": { + "const_": { + "kind": { + "Allocated": { + "align": 4, + "bytes": [ + 1, + 0, + 0, + 0 + ], + "mutability": "Mut", + "provenance": { + "ptrs": [] + } + } + } + }, + "user_ty": null + } + }, + { + "Constant": { + "const_": { + "kind": { + "Allocated": { + "align": 4, + "bytes": [ + 2, + 0, + 0, + 0 + ], + "mutability": "Mut", + "provenance": { + "ptrs": [] + } + } + } + }, + "user_ty": null } } ] ] } ] - }, - "span": 3 + } }, { "kind": { "Assign": [ { - "local": 7, + "local": 4, "projection": [] }, { - "Ref": [ + "Use": { + "Copy": { + "local": 1, + "projection": [ + { + "Field": [ + 0, + 0 + ] + } + ] + } + } + } + ] + } + }, + { + "kind": { + "Assign": [ + { + "local": 5, + "projection": [] + }, + { + "CheckedBinaryOp": [ + "Add", { - "kind": "ReErased" + "Copy": { + "local": 4, + "projection": [] + } }, - "Shared", { - "local": 8, - "projection": [] + "Constant": { + "const_": { + "kind": { + "Allocated": { + "align": 4, + "bytes": [ + 1, + 0, + 0, + 0 + ], + "mutability": "Mut", + "provenance": { + "ptrs": [] + } + } + } + }, + "user_ty": null + } } ] } ] - }, - "span": 2 + } + } + ], + "terminator": { + "kind": { + "Assert": { + "cond": { + "Move": { + "local": 5, + "projection": [ + { + "Field": [ + 1, + 0 + ] + } + ] + } + }, + "expected": false, + "msg": { + "Overflow": [ + "Add", + { + "Move": { + "local": 4, + "projection": [] + } + }, + { + "Constant": { + "const_": { + "kind": { + "Allocated": { + "align": 4, + "bytes": [ + 1, + 0, + 0, + 0 + ], + "mutability": "Mut", + "provenance": { + "ptrs": [] + } + } + } + }, + "user_ty": null + } + } + ] + }, + "target": 1, + "unwind": "Continue" + } + } + } + }, + { + "statements": [ + { + "kind": { + "Assign": [ + { + "local": 3, + "projection": [] + }, + { + "Use": { + "Move": { + "local": 5, + "projection": [ + { + "Field": [ + 0, + 0 + ] + } + ] + } + } + } + ] + } }, { "kind": { @@ -1595,253 +1365,192 @@ "projection": [] }, { - "Cast": [ + "Use": { + "Copy": { + "local": 1, + "projection": [ + { + "Field": [ + 1, + 0 + ] + } + ] + } + } + } + ] + } + }, + { + "kind": { + "Assign": [ + { + "local": 2, + "projection": [] + }, + { + "BinaryOp": [ + "Eq", { - "PointerCoercion": "Unsize" + "Move": { + "local": 3, + "projection": [] + } }, { - "Copy": { - "local": 7, + "Move": { + "local": 6, "projection": [] } - }, - 5 + } + ] + } + ] + } + } + ], + "terminator": { + "kind": { + "SwitchInt": { + "discr": { + "Move": { + "local": 2, + "projection": [] + } + }, + "targets": { + "branches": [ + [ + 0, + 3 ] - } - ] - }, - "span": 2 + ], + "otherwise": 2 + } + } } - ], + } + }, + { + "statements": [], + "terminator": { + "kind": "Return" + } + }, + { + "statements": [], "terminator": { "kind": { "Call": { "args": [ { - "Move": { - "local": 6, - "projection": [] - } - }, - { - "Move": { - "local": 2, - "projection": [] - } - }, - { - "Move": { - "local": 3, - "projection": [] - } - }, - { - "Move": { - "local": 4, - "projection": [] + "Constant": { + "const_": { + "kind": { + "Allocated": { + "align": 8, + "bytes": [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 32, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "mutability": "Mut", + "provenance": { + "ptrs": [ + [ + 0, + 0 + ] + ] + } + } + } + }, + "user_ty": null } } ], "destination": { - "local": 5, + "local": 7, "projection": [] }, "func": { "Constant": { "const_": { - "id": 0, "kind": "ZeroSized" }, - "span": 0, "user_ty": null } }, - "target": 1, + "target": null, "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": [ { - "mutability": "Mut", - "span": 8 - }, - { - "mutability": "Not", - "span": 9 + "mutability": "Mut" }, { - "mutability": "Not", - "span": 10 + "mutability": "Not" }, { - "mutability": "Not", - "span": 11 + "mutability": "Mut" }, { - "mutability": "Not", - "span": 12 + "mutability": "Mut" }, { - "mutability": "Mut", - "span": 1 + "mutability": "Mut" }, { - "mutability": "Mut", - "span": 2 + "mutability": "Mut" }, { - "mutability": "Not", - "span": 2 + "mutability": "Mut" }, { - "mutability": "Not", - "span": 3 + "mutability": "Mut" } ], - "span": 13, "spread_arg": null, "var_debug_info": [ - { - "argument_index": 1, - "composite": null, - "name": "main", - "source_info": { - "scope": 0, - "span": 9 - }, - "value": { - "Place": { - "local": 1, - "projection": [] - } - } - }, - { - "argument_index": 2, - "composite": null, - "name": "argc", - "source_info": { - "scope": 0, - "span": 10 - }, - "value": { - "Place": { - "local": 2, - "projection": [] - } - } - }, - { - "argument_index": 3, - "composite": null, - "name": "argv", - "source_info": { - "scope": 0, - "span": 11 - }, - "value": { - "Place": { - "local": 3, - "projection": [] - } - } - }, - { - "argument_index": 4, - "composite": null, - "name": "sigpipe", - "source_info": { - "scope": 0, - "span": 12 - }, - "value": { - "Place": { - "local": 4, - "projection": [] - } - } - }, { "argument_index": null, "composite": null, - "name": "v", + "name": "s", "source_info": { - "scope": 1, - "span": 6 + "scope": 1 }, "value": { "Place": { - "local": 0, + "local": 1, "projection": [] } } } ] }, - "id": 0, - "name": "std::rt::lang_start::<()>" + "name": "main" } }, - "symbol_name": "_ZN3std2rt10lang_start17h" + "symbol_name": "_ZN6struct4main17h" } ], "types": [ @@ -1883,54 +1592,6 @@ } } ], - [ - { - "EnumType": { - "discriminants": [ - 0, - 1 - ], - "fields": "elided", - "layout": { - "abi": { - "Scalar": { - "Initialized": { - "valid_range": { - "end": 18446744073709551615, - "start": 0 - }, - "value": { - "Int": { - "length": "I64", - "signed": true - } - } - } - } - }, - "abi_align": 8, - "fields": { - "Arbitrary": { - "offsets": [ - { - "num_bits": 0 - } - ] - } - }, - "size": { - "num_bits": 64 - }, - "variants": { - "Single": { - "index": 0 - } - } - }, - "name": "std::result::Result" - } - } - ], [ { "StructType": { @@ -2409,39 +2070,6 @@ } } ], - [ - { - "RefType": { - "layout": { - "abi": { - "Scalar": { - "Initialized": { - "valid_range": { - "end": 18446744073709551615, - "start": 1 - }, - "value": { - "Pointer": 0 - } - } - } - }, - "abi_align": 8, - "fields": "Primitive", - "size": { - "num_bits": 64 - }, - "variants": { - "Single": { - "index": 0 - } - } - }, - "mutability": "Not", - "pointee_type": "elided" - } - } - ], [ { "RefType": { diff --git a/tests/integration/programs/sum-to-n.smir.json.expected b/tests/integration/expected/nightly-2025-03-01/sum-to-n.smir.json.expected similarity index 80% rename from tests/integration/programs/sum-to-n.smir.json.expected rename to tests/integration/expected/nightly-2025-03-01/sum-to-n.smir.json.expected index 343e5e31..7fe0a490 100644 --- a/tests/integration/programs/sum-to-n.smir.json.expected +++ b/tests/integration/expected/nightly-2025-03-01/sum-to-n.smir.json.expected @@ -101,478 +101,263 @@ "mono_item_kind": { "MonoItemFn": { "body": { - "arg_count": 0, + "arg_count": 4, "blocks": [ { - "statements": [], - "terminator": { - "kind": { - "Call": { - "args": [], - "destination": { - "local": 1, - "projection": [] - }, - "func": { - "Constant": { - "const_": { - "id": 16, - "kind": "ZeroSized" - }, - "span": 84, - "user_ty": null - } - }, - "target": 1, - "unwind": "Continue" + "statements": [ + { + "kind": { + "StorageLive": 5 + } + }, + { + "kind": { + "StorageLive": 7 } }, - "span": 85 - } - }, - { - "statements": [], - "terminator": { - "kind": "Return", - "span": 86 - } - } - ], - "locals": [ - { - "mutability": "Mut", - "span": 87 - }, - { - "mutability": "Not", - "span": 85 - } - ], - "span": 88, - "spread_arg": null, - "var_debug_info": [] - }, - "id": 8, - "name": "main" - } - }, - "symbol_name": "_ZN8sum_to_n4main17h" - }, - { - "details": null, - "mono_item_kind": { - "MonoItemFn": { - "body": { - "arg_count": 0, - "blocks": [ - { - "statements": [ { "kind": { "Assign": [ { - "local": 3, + "local": 7, "projection": [] }, { - "Use": { - "Constant": { - "const_": { - "id": 12, - "kind": { - "Allocated": { - "align": 8, - "bytes": [ - 10, - 0, - 0, - 0, - 0, - 0, - 0, - 0 - ], - "mutability": "Mut", - "provenance": { - "ptrs": [] - } + "Aggregate": [ + { + "Closure": [ + 0, + [ + { + "Type": 0 + }, + { + "Type": 0 + }, + { + "Type": 0 + }, + { + "Type": 0 } + ] + ] + }, + [ + { + "Copy": { + "local": 1, + "projection": [] } - }, - "span": 71, - "user_ty": null + } + ] + ] + } + ] + } + }, + { + "kind": { + "Assign": [ + { + "local": 6, + "projection": [] + }, + { + "Ref": [ + { + "kind": "ReErased" + }, + "Shared", + { + "local": 7, + "projection": [] } - } + ] } ] - }, - "span": 72 + } + }, + { + "kind": { + "Assign": [ + { + "local": 5, + "projection": [] + }, + { + "Cast": [ + { + "PointerCoercion": "Unsize" + }, + { + "Copy": { + "local": 6, + "projection": [] + } + }, + 0 + ] + } + ] + } } ], "terminator": { "kind": { "Call": { "args": [ + { + "Move": { + "local": 5, + "projection": [] + } + }, + { + "Move": { + "local": 2, + "projection": [] + } + }, { "Move": { "local": 3, "projection": [] } + }, + { + "Move": { + "local": 4, + "projection": [] + } } ], "destination": { - "local": 2, + "local": 0, "projection": [] }, "func": { "Constant": { "const_": { - "id": 11, "kind": "ZeroSized" }, - "span": 69, "user_ty": null } }, "target": 1, "unwind": "Continue" } - }, - "span": 70 + } } }, { "statements": [ { "kind": { - "Assign": [ - { - "local": 4, - "projection": [] - }, - { - "Use": { - "Constant": { - "const_": { - "id": 13, - "kind": { - "Allocated": { - "align": 8, - "bytes": [ - 55, - 0, - 0, - 0, - 0, - 0, - 0, - 0 - ], - "mutability": "Mut", - "provenance": { - "ptrs": [] - } - } - } - }, - "span": 74, - "user_ty": null - } - } - } - ] - }, - "span": 75 + "StorageDead": 5 + } }, { "kind": { - "Assign": [ - { - "local": 1, - "projection": [] - }, - { - "BinaryOp": [ - "Eq", - { - "Move": { - "local": 2, - "projection": [] - } - }, - { - "Move": { - "local": 4, - "projection": [] - } - } - ] - } - ] - }, - "span": 76 + "StorageDead": 7 + } } ], "terminator": { - "kind": { - "SwitchInt": { - "discr": { - "Copy": { - "local": 1, - "projection": [] - } - }, - "targets": { - "branches": [ - [ - 0, - 2 - ] - ], - "otherwise": 3 - } - } - }, - "span": 73 - } - }, - { - "statements": [], - "terminator": { - "kind": { - "Call": { - "args": [ - { - "Constant": { - "const_": { - "id": 15, - "kind": { - "Allocated": { - "align": 8, - "bytes": [ - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 24, - 0, - 0, - 0, - 0, - 0, - 0, - 0 - ], - "mutability": "Mut", - "provenance": { - "ptrs": [ - [ - 0, - 0 - ] - ] - } - } - } - }, - "span": 32, - "user_ty": null - } - } - ], - "destination": { - "local": 5, - "projection": [] - }, - "func": { - "Constant": { - "const_": { - "id": 14, - "kind": "ZeroSized" - }, - "span": 77, - "user_ty": null - } - }, - "target": null, - "unwind": "Continue" - } - }, - "span": 77 - } - }, - { - "statements": [], - "terminator": { - "kind": "Return", - "span": 78 + "kind": "Return" } } ], "locals": [ { - "mutability": "Mut", - "span": 79 + "mutability": "Mut" + }, + { + "mutability": "Not" + }, + { + "mutability": "Not" }, { - "mutability": "Not", - "span": 80 + "mutability": "Not" }, { - "mutability": "Mut", - "span": 70 + "mutability": "Not" }, { - "mutability": "Mut", - "span": 72 + "mutability": "Mut" }, { - "mutability": "Mut", - "span": 75 + "mutability": "Not" }, { - "mutability": "Mut", - "span": 77 + "mutability": "Not" } ], - "span": 83, "spread_arg": null, "var_debug_info": [ { - "argument_index": null, + "argument_index": 1, "composite": null, - "name": "n", + "name": "main", "source_info": { - "scope": 1, - "span": 81 + "scope": 0 }, "value": { - "Const": { - "const_": { - "id": 12, - "kind": { - "Allocated": { - "align": 8, - "bytes": [ - 10, - 0, - 0, - 0, - 0, - 0, - 0, - 0 - ], - "mutability": "Mut", - "provenance": { - "ptrs": [] - } - } - } - }, - "span": 71, - "user_ty": null + "Place": { + "local": 1, + "projection": [] } } }, { - "argument_index": null, + "argument_index": 2, "composite": null, - "name": "golden", + "name": "argc", "source_info": { - "scope": 2, - "span": 82 + "scope": 0 }, "value": { - "Const": { - "const_": { - "id": 13, - "kind": { - "Allocated": { - "align": 8, - "bytes": [ - 55, - 0, - 0, - 0, - 0, - 0, - 0, - 0 - ], - "mutability": "Mut", - "provenance": { - "ptrs": [] - } - } - } - }, - "span": 74, - "user_ty": null + "Place": { + "local": 2, + "projection": [] } } }, { - "argument_index": null, + "argument_index": 3, "composite": null, - "name": "sucess", + "name": "argv", "source_info": { - "scope": 3, - "span": 80 + "scope": 0 }, "value": { "Place": { - "local": 1, + "local": 3, "projection": [] } } - } - ] - }, - "id": 7, - "name": "test_sum_to_n" - } - }, - "symbol_name": "_ZN8sum_to_n13test_sum_to_n17h" - }, - { - "details": null, - "mono_item_kind": { - "MonoItemFn": { - "body": { - "arg_count": 1, - "blocks": [ - { - "statements": [], - "terminator": { - "kind": "Return", - "span": 44 - } - } - ], - "locals": [ - { - "mutability": "Mut", - "span": 44 }, { - "mutability": "Not", - "span": 44 + "argument_index": 4, + "composite": null, + "name": "sigpipe", + "source_info": { + "scope": 0 + }, + "value": { + "Place": { + "local": 4, + "projection": [] + } + } } - ], - "span": 44, - "spread_arg": null, - "var_debug_info": [] + ] }, - "id": 4, - "name": "std::ptr::drop_in_place::<{closure@std::rt::lang_start<()>::{closure#0}}>" + "name": "std::rt::lang_start::<()>" } }, - "symbol_name": "_ZN4core3ptr85drop_in_place$LT$std..rt..lang_start$LT$$LP$$RP$$GT$..$u7b$$u7b$closure$u7d$$u7d$$GT$17h" + "symbol_name": "_ZN3std2rt10lang_start17h" }, { "details": null, @@ -582,63 +367,94 @@ "arg_count": 1, "blocks": [ { - "statements": [], + "statements": [ + { + "kind": { + "StorageLive": 2 + } + }, + { + "kind": { + "StorageLive": 3 + } + }, + { + "kind": { + "StorageLive": 4 + } + }, + { + "kind": { + "Assign": [ + { + "local": 4, + "projection": [] + }, + { + "Use": { + "Copy": { + "local": 1, + "projection": [ + "Deref", + { + "Field": [ + 0, + 0 + ] + } + ] + } + } + } + ] + } + } + ], "terminator": { "kind": { "Call": { "args": [ { "Move": { - "local": 1, + "local": 4, "projection": [] } - }, - { - "Constant": { - "const_": { - "id": 4, - "kind": "ZeroSized" - }, - "span": 32, - "user_ty": null - } } ], "destination": { - "local": 0, + "local": 3, "projection": [] }, "func": { "Constant": { "const_": { - "id": 3, "kind": "ZeroSized" }, - "span": 31, "user_ty": null } }, "target": 1, "unwind": "Continue" } - }, - "span": 33 + } } }, { - "statements": [], + "statements": [ + { + "kind": { + "StorageDead": 4 + } + } + ], "terminator": { "kind": { "Call": { "args": [ { - "Constant": { - "const_": { - "id": 4, - "kind": "ZeroSized" - }, - "span": 32, - "user_ty": null + "Move": { + "local": 3, + "projection": [] } } ], @@ -649,101 +465,162 @@ "func": { "Constant": { "const_": { - "id": 5, "kind": "ZeroSized" }, - "span": 34, "user_ty": null } }, "target": 2, - "unwind": "Unreachable" + "unwind": "Continue" } - }, - "span": 35 + } } }, { - "statements": [], + "statements": [ + { + "kind": { + "StorageDead": 3 + } + }, + { + "kind": { + "StorageLive": 5 + } + }, + { + "kind": { + "Assign": [ + { + "local": 5, + "projection": [] + }, + { + "Use": { + "Copy": { + "local": 2, + "projection": [ + { + "Field": [ + 0, + 0 + ] + }, + { + "Field": [ + 0, + 0 + ] + } + ] + } + } + } + ] + } + }, + { + "kind": { + "Assign": [ + { + "local": 0, + "projection": [] + }, + { + "Cast": [ + "IntToInt", + { + "Move": { + "local": 5, + "projection": [] + } + }, + 0 + ] + } + ] + } + }, + { + "kind": { + "StorageDead": 5 + } + }, + { + "kind": { + "StorageDead": 2 + } + } + ], "terminator": { - "kind": "Return", - "span": 36 + "kind": "Return" } } ], "locals": [ { - "mutability": "Mut", - "span": 37 + "mutability": "Mut" + }, + { + "mutability": "Mut" + }, + { + "mutability": "Mut" + }, + { + "mutability": "Mut" }, { - "mutability": "Not", - "span": 38 + "mutability": "Mut" }, { - "mutability": "Not", - "span": 39 + "mutability": "Mut" } ], - "span": 42, "spread_arg": null, "var_debug_info": [ { - "argument_index": 1, + "argument_index": null, "composite": null, - "name": "f", + "name": "main", "source_info": { - "scope": 0, - "span": 38 + "scope": 0 }, "value": { "Place": { "local": 1, - "projection": [] + "projection": [ + "Deref", + { + "Field": [ + 0, + 0 + ] + } + ] } } }, { - "argument_index": null, + "argument_index": 1, "composite": null, - "name": "result", + "name": "self", "source_info": { - "scope": 1, - "span": 40 + "scope": 1 }, "value": { "Place": { - "local": 0, + "local": 2, "projection": [] } } - }, - { - "argument_index": 1, - "composite": null, - "name": "dummy", - "source_info": { - "scope": 2, - "span": 41 - }, - "value": { - "Const": { - "const_": { - "id": 4, - "kind": "ZeroSized" - }, - "span": 32, - "user_ty": null - } - } } ] }, - "id": 2, - "name": "std::sys::backtrace::__rust_begin_short_backtrace::" + "name": "std::rt::lang_start::<()>::{closure#0}" } }, - "symbol_name": "_ZN3std3sys9backtrace28__rust_begin_short_backtrace17h" + "symbol_name": "_ZN3std2rt10lang_start28_$u7b$$u7b$closure$u7d$$u7d$17h" }, { "details": null, @@ -753,677 +630,442 @@ "arg_count": 1, "blocks": [ { - "statements": [ - { - "kind": { - "Assign": [ + "statements": [], + "terminator": { + "kind": { + "Call": { + "args": [ { - "local": 0, - "projection": [] + "Move": { + "local": 1, + "projection": [] + } }, { - "Use": { - "Constant": { - "const_": { - "id": 8, - "kind": { - "Allocated": { - "align": 1, - "bytes": [ - 0 - ], - "mutability": "Mut", - "provenance": { - "ptrs": [] - } - } - } - }, - "span": 46, - "user_ty": null - } + "Constant": { + "const_": { + "kind": "ZeroSized" + }, + "user_ty": null } } - ] - }, - "span": 46 + ], + "destination": { + "local": 0, + "projection": [] + }, + "func": { + "Constant": { + "const_": { + "kind": "ZeroSized" + }, + "user_ty": null + } + }, + "target": 1, + "unwind": "Continue" + } } - ], + } + }, + { + "statements": [], + "terminator": { + "kind": { + "Call": { + "args": [ + { + "Constant": { + "const_": { + "kind": "ZeroSized" + }, + "user_ty": null + } + } + ], + "destination": { + "local": 2, + "projection": [] + }, + "func": { + "Constant": { + "const_": { + "kind": "ZeroSized" + }, + "user_ty": null + } + }, + "target": 2, + "unwind": "Unreachable" + } + } + } + }, + { + "statements": [], "terminator": { - "kind": "Return", - "span": 45 + "kind": "Return" } } ], "locals": [ { - "mutability": "Mut", - "span": 47 + "mutability": "Mut" + }, + { + "mutability": "Not" }, { - "mutability": "Not", - "span": 48 + "mutability": "Not" } ], - "span": 49, "spread_arg": null, "var_debug_info": [ { "argument_index": 1, "composite": null, - "name": "self", + "name": "f", + "source_info": { + "scope": 0 + }, + "value": { + "Place": { + "local": 1, + "projection": [] + } + } + }, + { + "argument_index": null, + "composite": null, + "name": "result", + "source_info": { + "scope": 1 + }, + "value": { + "Place": { + "local": 0, + "projection": [] + } + } + }, + { + "argument_index": 1, + "composite": null, + "name": "dummy", "source_info": { - "scope": 0, - "span": 48 + "scope": 2 }, "value": { "Const": { "const_": { - "id": 4, "kind": "ZeroSized" }, - "span": 32, "user_ty": null } } } ] }, - "id": 5, - "name": "<() as std::process::Termination>::report" + "name": "std::sys::backtrace::__rust_begin_short_backtrace::" } }, - "symbol_name": "_ZN54_$LT$$LP$$RP$$u20$as$u20$std..process..Termination$GT$6report17h" + "symbol_name": "_ZN3std3sys9backtrace28__rust_begin_short_backtrace17h" }, { "details": null, "mono_item_kind": { "MonoItemFn": { "body": { - "arg_count": 1, + "arg_count": 2, "blocks": [ { - "statements": [ - { - "kind": { - "Assign": [ - { - "local": 2, - "projection": [] - }, + "statements": [], + "terminator": { + "kind": { + "Call": { + "args": [ { - "Use": { - "Constant": { - "const_": { - "id": 9, - "kind": { - "Allocated": { - "align": 8, - "bytes": [ - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0 - ], - "mutability": "Mut", - "provenance": { - "ptrs": [] - } - } - } - }, - "span": 51, - "user_ty": null - } + "Move": { + "local": 1, + "projection": [ + "Deref" + ] } - } - ] - }, - "span": 51 - }, - { - "kind": { - "Assign": [ - { - "local": 3, - "projection": [] }, { - "Use": { - "Copy": { - "local": 1, - "projection": [] - } + "Move": { + "local": 2, + "projection": [] } } - ] - }, - "span": 52 + ], + "destination": { + "local": 0, + "projection": [] + }, + "func": { + "Constant": { + "const_": { + "kind": "ZeroSized" + }, + "user_ty": null + } + }, + "target": 1, + "unwind": "Continue" + } } - ], + } + }, + { + "statements": [], "terminator": { - "kind": { - "Goto": { - "target": 1 - } - }, - "span": 50 + "kind": "Return" } + } + ], + "locals": [ + { + "mutability": "Mut" }, { - "statements": [ - { - "kind": { - "Assign": [ - { - "local": 5, - "projection": [] - }, - { - "Use": { - "Copy": { - "local": 3, - "projection": [] - } - } - } - ] - }, - "span": 54 - }, - { - "kind": { - "Assign": [ - { - "local": 4, - "projection": [] - }, - { - "BinaryOp": [ - "Gt", - { - "Move": { - "local": 5, - "projection": [] - } - }, - { - "Constant": { - "const_": { - "id": 9, - "kind": { - "Allocated": { - "align": 8, - "bytes": [ - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0 - ], - "mutability": "Mut", - "provenance": { - "ptrs": [] - } - } - } - }, - "span": 55, - "user_ty": null - } - } - ] - } - ] - }, - "span": 53 - } - ], + "mutability": "Not" + }, + { + "mutability": "Not" + } + ], + "spread_arg": 2, + "var_debug_info": [] + }, + "name": "<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once" + } + }, + "symbol_name": "_ZN4core3ops8function6FnOnce40call_once$u7b$$u7b$vtable.shim$u7d$$u7d$17h" + }, + { + "details": null, + "mono_item_kind": { + "MonoItemFn": { + "body": { + "arg_count": 2, + "blocks": [ + { + "statements": [], "terminator": { "kind": { - "SwitchInt": { - "discr": { + "Call": { + "args": [], + "destination": { + "local": 0, + "projection": [] + }, + "func": { "Move": { - "local": 4, + "local": 1, "projection": [] } }, - "targets": { - "branches": [ - [ - 0, - 5 - ] - ], - "otherwise": 2 - } + "target": 1, + "unwind": "Continue" } - }, - "span": 53 + } } }, { - "statements": [ - { - "kind": { - "Assign": [ - { - "local": 6, - "projection": [] - }, - { - "Use": { - "Copy": { - "local": 3, - "projection": [] - } - } - } - ] - }, - "span": 57 - }, - { - "kind": { - "Assign": [ - { - "local": 7, - "projection": [] - }, - { - "CheckedBinaryOp": [ - "Add", - { - "Copy": { - "local": 2, - "projection": [] - } - }, - { - "Copy": { - "local": 6, - "projection": [] - } - } - ] - } - ] - }, - "span": 56 - } - ], + "statements": [], "terminator": { - "kind": { - "Assert": { - "cond": { - "Move": { - "local": 7, - "projection": [ - { - "Field": [ - 1, - 26 - ] - } - ] - } - }, - "expected": false, - "msg": { - "Overflow": [ - "Add", - { - "Copy": { - "local": 2, - "projection": [] - } - }, - { - "Move": { - "local": 6, - "projection": [] - } - } - ] - }, - "target": 3, - "unwind": "Continue" - } - }, - "span": 56 + "kind": "Return" } + } + ], + "locals": [ + { + "mutability": "Mut" + }, + { + "mutability": "Not" }, + { + "mutability": "Not" + } + ], + "spread_arg": 2, + "var_debug_info": [] + }, + "name": ">::call_once" + } + }, + "symbol_name": "_ZN4core3ops8function6FnOnce9call_once17h" + }, + { + "details": null, + "mono_item_kind": { + "MonoItemFn": { + "body": { + "arg_count": 2, + "blocks": [ { "statements": [ { "kind": { "Assign": [ { - "local": 2, - "projection": [] - }, - { - "Use": { - "Move": { - "local": 7, - "projection": [ - { - "Field": [ - 0, - 25 - ] - } - ] - } - } - } - ] - }, - "span": 56 - }, - { - "kind": { - "Assign": [ - { - "local": 8, - "projection": [] - }, - { - "Use": { - "Copy": { - "local": 3, - "projection": [] - } - } - } - ] - }, - "span": 60 - }, - { - "kind": { - "Assign": [ - { - "local": 9, + "local": 3, "projection": [] }, { - "CheckedBinaryOp": [ - "Sub", + "Ref": [ { - "Copy": { - "local": 8, - "projection": [] - } + "kind": "ReErased" }, { - "Constant": { - "const_": { - "id": 10, - "kind": { - "Allocated": { - "align": 8, - "bytes": [ - 1, - 0, - 0, - 0, - 0, - 0, - 0, - 0 - ], - "mutability": "Mut", - "provenance": { - "ptrs": [] - } - } - } - }, - "span": 58, - "user_ty": null + "Mut": { + "kind": "Default" } + }, + { + "local": 1, + "projection": [] } ] } ] - }, - "span": 59 + } } ], "terminator": { "kind": { - "Assert": { - "cond": { - "Move": { - "local": 9, - "projection": [ - { - "Field": [ - 1, - 26 - ] - } - ] + "Call": { + "args": [ + { + "Move": { + "local": 3, + "projection": [] + } + }, + { + "Move": { + "local": 2, + "projection": [] + } } + ], + "destination": { + "local": 0, + "projection": [] }, - "expected": false, - "msg": { - "Overflow": [ - "Sub", - { - "Move": { - "local": 8, - "projection": [] - } + "func": { + "Constant": { + "const_": { + "kind": "ZeroSized" }, - { - "Constant": { - "const_": { - "id": 10, - "kind": { - "Allocated": { - "align": 8, - "bytes": [ - 1, - 0, - 0, - 0, - 0, - 0, - 0, - 0 - ], - "mutability": "Mut", - "provenance": { - "ptrs": [] - } - } - } - }, - "span": 58, - "user_ty": null - } - } - ] + "user_ty": null + } }, - "target": 4, - "unwind": "Continue" + "target": 1, + "unwind": { + "Cleanup": 3 + } } - }, - "span": 59 + } } }, { - "statements": [ - { - "kind": { - "Assign": [ - { - "local": 3, - "projection": [] - }, - { - "Use": { - "Move": { - "local": 9, - "projection": [ - { - "Field": [ - 0, - 25 - ] - } - ] - } - } - } - ] - }, - "span": 61 - } - ], + "statements": [], "terminator": { "kind": { - "Goto": { - "target": 1 + "Drop": { + "place": { + "local": 1, + "projection": [] + }, + "target": 2, + "unwind": "Continue" } - }, - "span": 50 + } } }, { - "statements": [ - { - "kind": { - "Assign": [ - { - "local": 0, - "projection": [] - }, - { - "Use": { - "Copy": { - "local": 2, - "projection": [] - } - } - } - ] - }, - "span": 63 + "statements": [], + "terminator": { + "kind": "Return" + } + }, + { + "statements": [], + "terminator": { + "kind": { + "Drop": { + "place": { + "local": 1, + "projection": [] + }, + "target": 4, + "unwind": "Terminate" + } } - ], + } + }, + { + "statements": [], "terminator": { - "kind": "Return", - "span": 62 + "kind": "Resume" } } ], "locals": [ { - "mutability": "Mut", - "span": 64 - }, - { - "mutability": "Not", - "span": 65 - }, - { - "mutability": "Mut", - "span": 66 - }, - { - "mutability": "Mut", - "span": 67 - }, - { - "mutability": "Mut", - "span": 53 - }, - { - "mutability": "Mut", - "span": 54 - }, - { - "mutability": "Mut", - "span": 57 + "mutability": "Mut" }, { - "mutability": "Mut", - "span": 56 + "mutability": "Not" }, { - "mutability": "Mut", - "span": 60 + "mutability": "Not" }, { - "mutability": "Mut", - "span": 59 + "mutability": "Not" } ], - "span": 68, - "spread_arg": null, - "var_debug_info": [ + "spread_arg": 2, + "var_debug_info": [] + }, + "name": "<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once" + } + }, + "symbol_name": "_ZN4core3ops8function6FnOnce9call_once17h" + }, + { + "details": null, + "mono_item_kind": { + "MonoItemFn": { + "body": { + "arg_count": 1, + "blocks": [ { - "argument_index": 1, - "composite": null, - "name": "n", - "source_info": { - "scope": 0, - "span": 65 - }, - "value": { - "Place": { - "local": 1, - "projection": [] - } + "statements": [], + "terminator": { + "kind": "Return" } - }, + } + ], + "locals": [ { - "argument_index": null, - "composite": null, - "name": "sum", - "source_info": { - "scope": 1, - "span": 66 - }, - "value": { - "Place": { - "local": 2, - "projection": [] - } - } + "mutability": "Mut" }, { - "argument_index": null, - "composite": null, - "name": "counter", - "source_info": { - "scope": 2, - "span": 67 - }, - "value": { - "Place": { - "local": 3, - "projection": [] - } - } + "mutability": "Not" } - ] + ], + "spread_arg": null, + "var_debug_info": [] }, - "id": 6, - "name": "sum_to_n" + "name": "std::ptr::drop_in_place::<{closure@std::rt::lang_start<()>::{closure#0}}>" } }, - "symbol_name": "_ZN8sum_to_n8sum_to_n17h" + "symbol_name": "_ZN4core3ptr85drop_in_place$LT$std..rt..lang_start$LT$$LP$$RP$$GT$..$u7b$$u7b$closure$u7d$$u7d$$GT$17h" }, { "details": null, @@ -1434,355 +1076,414 @@ "blocks": [ { "statements": [ - { - "kind": { - "StorageLive": 2 - }, - "span": 16 - }, - { - "kind": { - "StorageLive": 3 - }, - "span": 15 - }, - { - "kind": { - "StorageLive": 4 - }, - "span": 17 - }, { "kind": { "Assign": [ { - "local": 4, + "local": 0, "projection": [] }, { "Use": { - "Copy": { - "local": 1, - "projection": [ - "Deref", - { - "Field": [ - 0, - 7 - ] + "Constant": { + "const_": { + "kind": { + "Allocated": { + "align": 1, + "bytes": [ + 0 + ], + "mutability": "Mut", + "provenance": { + "ptrs": [] + } + } } - ] + }, + "user_ty": null } } } ] - }, - "span": 17 - } - ], - "terminator": { - "kind": { - "Call": { - "args": [ - { - "Move": { - "local": 4, - "projection": [] - } - } - ], - "destination": { - "local": 3, - "projection": [] - }, - "func": { - "Constant": { - "const_": { - "id": 1, - "kind": "ZeroSized" - }, - "span": 14, - "user_ty": null - } - }, - "target": 1, - "unwind": "Continue" } - }, - "span": 15 - } - }, - { - "statements": [ - { - "kind": { - "StorageDead": 4 - }, - "span": 19 } ], "terminator": { - "kind": { - "Call": { - "args": [ - { - "Move": { - "local": 3, - "projection": [] - } - } - ], - "destination": { - "local": 2, - "projection": [] - }, - "func": { - "Constant": { - "const_": { - "id": 2, - "kind": "ZeroSized" - }, - "span": 18, - "user_ty": null - } - }, - "target": 2, - "unwind": "Continue" - } - }, - "span": 16 + "kind": "Return" } + } + ], + "locals": [ + { + "mutability": "Mut" }, + { + "mutability": "Not" + } + ], + "spread_arg": null, + "var_debug_info": [] + }, + "name": "<() as std::process::Termination>::report" + } + }, + "symbol_name": "_ZN54_$LT$$LP$$RP$$u20$as$u20$std..process..Termination$GT$6report17h" + }, + { + "details": null, + "mono_item_kind": { + "MonoItemFn": { + "body": { + "arg_count": 0, + "blocks": [ { "statements": [ - { - "kind": { - "StorageDead": 3 - }, - "span": 21 - }, - { - "kind": { - "StorageLive": 5 - }, - "span": 22 - }, { "kind": { "Assign": [ { - "local": 5, + "local": 3, "projection": [] }, { - "Ref": [ - { - "kind": "ReErased" - }, - "Shared", - { - "local": 2, - "projection": [ - { - "Field": [ - 0, - 15 - ] + "Use": { + "Constant": { + "const_": { + "kind": { + "Allocated": { + "align": 8, + "bytes": [ + 10, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "mutability": "Mut", + "provenance": { + "ptrs": [] + } + } } - ] + }, + "user_ty": null } - ] + } + } + ] + } + } + ], + "terminator": { + "kind": { + "Call": { + "args": [ + { + "Move": { + "local": 3, + "projection": [] + } } - ] - }, - "span": 22 - }, - { - "kind": { - "StorageLive": 6 - }, - "span": 23 - }, + ], + "destination": { + "local": 2, + "projection": [] + }, + "func": { + "Constant": { + "const_": { + "kind": "ZeroSized" + }, + "user_ty": null + } + }, + "target": 1, + "unwind": "Continue" + } + } + } + }, + { + "statements": [ { "kind": { "Assign": [ { - "local": 6, + "local": 4, "projection": [] }, { "Use": { - "Copy": { - "local": 2, - "projection": [ - { - "Field": [ - 0, - 15 - ] - }, - { - "Field": [ - 0, - 9 - ] + "Constant": { + "const_": { + "kind": { + "Allocated": { + "align": 8, + "bytes": [ + 55, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "mutability": "Mut", + "provenance": { + "ptrs": [] + } + } } - ] + }, + "user_ty": null } } } ] - }, - "span": 23 + } }, { "kind": { "Assign": [ { - "local": 0, + "local": 1, "projection": [] }, { - "Cast": [ - "IntToInt", + "BinaryOp": [ + "Eq", { "Move": { - "local": 6, + "local": 2, "projection": [] } }, - 16 + { + "Move": { + "local": 4, + "projection": [] + } + } ] } ] - }, - "span": 24 - }, - { - "kind": { - "StorageDead": 6 - }, - "span": 25 - }, - { - "kind": { - "StorageDead": 5 - }, - "span": 26 - }, - { - "kind": { - "StorageDead": 2 - }, - "span": 27 + } } ], "terminator": { - "kind": "Return", - "span": 20 + "kind": { + "SwitchInt": { + "discr": { + "Copy": { + "local": 1, + "projection": [] + } + }, + "targets": { + "branches": [ + [ + 0, + 2 + ] + ], + "otherwise": 3 + } + } + } + } + }, + { + "statements": [], + "terminator": { + "kind": { + "Call": { + "args": [ + { + "Constant": { + "const_": { + "kind": { + "Allocated": { + "align": 8, + "bytes": [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 24, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "mutability": "Mut", + "provenance": { + "ptrs": [ + [ + 0, + 0 + ] + ] + } + } + } + }, + "user_ty": null + } + } + ], + "destination": { + "local": 5, + "projection": [] + }, + "func": { + "Constant": { + "const_": { + "kind": "ZeroSized" + }, + "user_ty": null + } + }, + "target": null, + "unwind": "Continue" + } + } + } + }, + { + "statements": [], + "terminator": { + "kind": "Return" } } ], "locals": [ { - "mutability": "Mut", - "span": 28 - }, - { - "mutability": "Mut", - "span": 3 + "mutability": "Mut" }, { - "mutability": "Mut", - "span": 16 + "mutability": "Not" }, { - "mutability": "Mut", - "span": 15 + "mutability": "Mut" }, { - "mutability": "Mut", - "span": 17 + "mutability": "Mut" }, { - "mutability": "Mut", - "span": 22 + "mutability": "Mut" }, { - "mutability": "Mut", - "span": 23 + "mutability": "Mut" } ], - "span": 3, "spread_arg": null, "var_debug_info": [ { "argument_index": null, "composite": null, - "name": "main", + "name": "n", "source_info": { - "scope": 0, - "span": 9 + "scope": 1 }, "value": { - "Place": { - "local": 1, - "projection": [ - "Deref", - { - "Field": [ - 0, - 7 - ] + "Const": { + "const_": { + "kind": { + "Allocated": { + "align": 8, + "bytes": [ + 10, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "mutability": "Mut", + "provenance": { + "ptrs": [] + } + } + } + }, + "user_ty": null + } + } + }, + { + "argument_index": null, + "composite": null, + "name": "golden", + "source_info": { + "scope": 2 + }, + "value": { + "Const": { + "const_": { + "kind": { + "Allocated": { + "align": 8, + "bytes": [ + 55, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "mutability": "Mut", + "provenance": { + "ptrs": [] + } + } } - ] - } - } - }, - { - "argument_index": 1, - "composite": null, - "name": "self", - "source_info": { - "scope": 1, - "span": 29 - }, - "value": { - "Place": { - "local": 2, - "projection": [] + }, + "user_ty": null } } }, { - "argument_index": 1, + "argument_index": null, "composite": null, - "name": "self", + "name": "sucess", "source_info": { - "scope": 2, - "span": 30 + "scope": 3 }, "value": { "Place": { - "local": 5, + "local": 1, "projection": [] } } } ] }, - "id": 1, - "name": "std::rt::lang_start::<()>::{closure#0}" + "name": "test_sum_to_n" } }, - "symbol_name": "_ZN3std2rt10lang_start28_$u7b$$u7b$closure$u7d$$u7d$17h" + "symbol_name": "_ZN8sum_to_n13test_sum_to_n17h" }, { "details": null, "mono_item_kind": { "MonoItemFn": { "body": { - "arg_count": 2, + "arg_count": 0, "blocks": [ { "statements": [], @@ -1791,482 +1492,469 @@ "Call": { "args": [], "destination": { - "local": 0, + "local": 1, "projection": [] }, "func": { - "Move": { - "local": 1, - "projection": [] + "Constant": { + "const_": { + "kind": "ZeroSized" + }, + "user_ty": null } }, "target": 1, "unwind": "Continue" } - }, - "span": 43 + } } }, { "statements": [], "terminator": { - "kind": "Return", - "span": 43 + "kind": "Return" } } ], "locals": [ { - "mutability": "Mut", - "span": 43 - }, - { - "mutability": "Not", - "span": 43 + "mutability": "Mut" }, { - "mutability": "Not", - "span": 43 + "mutability": "Not" } ], - "span": 43, - "spread_arg": 2, + "spread_arg": null, "var_debug_info": [] }, - "id": 3, - "name": ">::call_once" + "name": "main" } }, - "symbol_name": "_ZN4core3ops8function6FnOnce9call_once17h" + "symbol_name": "_ZN8sum_to_n4main17h" }, { "details": null, "mono_item_kind": { "MonoItemFn": { "body": { - "arg_count": 2, + "arg_count": 1, "blocks": [ { - "statements": [], - "terminator": { - "kind": { - "Call": { - "args": [ + "statements": [ + { + "kind": { + "Assign": [ { - "Move": { - "local": 1, - "projection": [ - "Deref" - ] - } + "local": 2, + "projection": [] }, { - "Move": { - "local": 2, - "projection": [] + "Use": { + "Constant": { + "const_": { + "kind": { + "Allocated": { + "align": 8, + "bytes": [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "mutability": "Mut", + "provenance": { + "ptrs": [] + } + } + } + }, + "user_ty": null + } } } - ], - "destination": { - "local": 0, - "projection": [] - }, - "func": { - "Constant": { - "const_": { - "id": 6, - "kind": "ZeroSized" - }, - "span": 43, - "user_ty": null - } - }, - "target": 1, - "unwind": "Continue" + ] } }, - "span": 43 + { + "kind": { + "Assign": [ + { + "local": 3, + "projection": [] + }, + { + "Use": { + "Copy": { + "local": 1, + "projection": [] + } + } + } + ] + } + } + ], + "terminator": { + "kind": { + "Goto": { + "target": 1 + } + } } }, { - "statements": [], + "statements": [ + { + "kind": { + "Assign": [ + { + "local": 5, + "projection": [] + }, + { + "Use": { + "Copy": { + "local": 3, + "projection": [] + } + } + } + ] + } + }, + { + "kind": { + "Assign": [ + { + "local": 4, + "projection": [] + }, + { + "BinaryOp": [ + "Gt", + { + "Move": { + "local": 5, + "projection": [] + } + }, + { + "Constant": { + "const_": { + "kind": { + "Allocated": { + "align": 8, + "bytes": [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "mutability": "Mut", + "provenance": { + "ptrs": [] + } + } + } + }, + "user_ty": null + } + } + ] + } + ] + } + } + ], "terminator": { - "kind": "Return", - "span": 43 + "kind": { + "SwitchInt": { + "discr": { + "Move": { + "local": 4, + "projection": [] + } + }, + "targets": { + "branches": [ + [ + 0, + 5 + ] + ], + "otherwise": 2 + } + } + } } - } - ], - "locals": [ - { - "mutability": "Mut", - "span": 43 - }, - { - "mutability": "Not", - "span": 43 }, - { - "mutability": "Not", - "span": 43 - } - ], - "span": 43, - "spread_arg": 2, - "var_debug_info": [] - }, - "id": 3, - "name": "<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once" - } - }, - "symbol_name": "_ZN4core3ops8function6FnOnce40call_once$u7b$$u7b$vtable.shim$u7d$$u7d$17h" - }, - { - "details": null, - "mono_item_kind": { - "MonoItemFn": { - "body": { - "arg_count": 2, - "blocks": [ { "statements": [ { "kind": { "Assign": [ { - "local": 3, + "local": 6, + "projection": [] + }, + { + "Use": { + "Copy": { + "local": 3, + "projection": [] + } + } + } + ] + } + }, + { + "kind": { + "Assign": [ + { + "local": 7, "projection": [] }, { - "Ref": [ - { - "kind": "ReErased" - }, + "CheckedBinaryOp": [ + "Add", { - "Mut": { - "kind": "Default" + "Copy": { + "local": 2, + "projection": [] } }, { - "local": 1, - "projection": [] + "Copy": { + "local": 6, + "projection": [] + } } ] } ] - }, - "span": 43 + } } ], "terminator": { "kind": { - "Call": { - "args": [ - { - "Move": { - "local": 3, - "projection": [] - } - }, - { - "Move": { - "local": 2, - "projection": [] - } + "Assert": { + "cond": { + "Move": { + "local": 7, + "projection": [ + { + "Field": [ + 1, + 0 + ] + } + ] } - ], - "destination": { - "local": 0, - "projection": [] }, - "func": { - "Constant": { - "const_": { - "id": 7, - "kind": "ZeroSized" + "expected": false, + "msg": { + "Overflow": [ + "Add", + { + "Copy": { + "local": 2, + "projection": [] + } }, - "span": 43, - "user_ty": null - } - }, - "target": 1, - "unwind": { - "Cleanup": 3 - } - } - }, - "span": 43 - } - }, - { - "statements": [], - "terminator": { - "kind": { - "Drop": { - "place": { - "local": 1, - "projection": [] + { + "Move": { + "local": 6, + "projection": [] + } + } + ] }, - "target": 2, + "target": 3, "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": [ - { - "mutability": "Mut", - "span": 43 - }, - { - "mutability": "Not", - "span": 43 - }, - { - "mutability": "Not", - "span": 43 }, - { - "mutability": "Not", - "span": 43 - } - ], - "span": 43, - "spread_arg": 2, - "var_debug_info": [] - }, - "id": 3, - "name": "<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once" - } - }, - "symbol_name": "_ZN4core3ops8function6FnOnce9call_once17h" - }, - { - "details": null, - "mono_item_kind": { - "MonoItemFn": { - "body": { - "arg_count": 4, - "blocks": [ { "statements": [ - { - "kind": { - "StorageLive": 5 - }, - "span": 1 - }, - { - "kind": { - "StorageLive": 6 - }, - "span": 2 - }, - { - "kind": { - "StorageLive": 8 - }, - "span": 3 - }, { "kind": { "Assign": [ { - "local": 8, + "local": 2, "projection": [] }, { - "Aggregate": [ - { - "Closure": [ - 1, - [ - { - "Type": 1 - }, - { - "Type": 2 - }, - { - "Type": 3 - }, - { - "Type": 4 - } - ] - ] - }, - [ - { - "Copy": { - "local": 1, - "projection": [] + "Use": { + "Move": { + "local": 7, + "projection": [ + { + "Field": [ + 0, + 0 + ] } - } - ] - ] + ] + } + } } ] - }, - "span": 3 + } }, { "kind": { "Assign": [ { - "local": 7, + "local": 8, "projection": [] }, { - "Ref": [ - { - "kind": "ReErased" - }, - "Shared", - { - "local": 8, + "Use": { + "Copy": { + "local": 3, "projection": [] } - ] + } } ] - }, - "span": 2 + } }, { "kind": { "Assign": [ { - "local": 6, + "local": 9, "projection": [] }, { - "Cast": [ - { - "PointerCoercion": "Unsize" - }, + "CheckedBinaryOp": [ + "Sub", { "Copy": { - "local": 7, + "local": 8, "projection": [] } - }, - 5 + }, + { + "Constant": { + "const_": { + "kind": { + "Allocated": { + "align": 8, + "bytes": [ + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "mutability": "Mut", + "provenance": { + "ptrs": [] + } + } + } + }, + "user_ty": null + } + } ] } ] - }, - "span": 2 + } } ], "terminator": { "kind": { - "Call": { - "args": [ - { - "Move": { - "local": 6, - "projection": [] - } - }, - { - "Move": { - "local": 2, - "projection": [] - } - }, - { - "Move": { - "local": 3, - "projection": [] - } - }, - { - "Move": { - "local": 4, - "projection": [] - } + "Assert": { + "cond": { + "Move": { + "local": 9, + "projection": [ + { + "Field": [ + 1, + 0 + ] + } + ] } - ], - "destination": { - "local": 5, - "projection": [] }, - "func": { - "Constant": { - "const_": { - "id": 0, - "kind": "ZeroSized" + "expected": false, + "msg": { + "Overflow": [ + "Sub", + { + "Move": { + "local": 8, + "projection": [] + } }, - "span": 0, - "user_ty": null - } + { + "Constant": { + "const_": { + "kind": { + "Allocated": { + "align": 8, + "bytes": [ + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "mutability": "Mut", + "provenance": { + "ptrs": [] + } + } + } + }, + "user_ty": null + } + } + ] }, - "target": 1, + "target": 4, "unwind": "Continue" } - }, - "span": 1 + } } }, { "statements": [ - { - "kind": { - "StorageDead": 6 - }, - "span": 5 - }, { "kind": { "Assign": [ { - "local": 0, + "local": 3, "projection": [] }, { "Use": { - "Copy": { - "local": 5, + "Move": { + "local": 9, "projection": [ - { - "Downcast": 0 - }, { "Field": [ 0, - 6 + 0 ] } ] @@ -2274,76 +1962,83 @@ } } ] - }, - "span": 6 - }, - { - "kind": { - "StorageDead": 8 - }, - "span": 7 - }, + } + } + ], + "terminator": { + "kind": { + "Goto": { + "target": 1 + } + } + } + }, + { + "statements": [ { "kind": { - "StorageDead": 5 - }, - "span": 7 + "Assign": [ + { + "local": 0, + "projection": [] + }, + { + "Use": { + "Copy": { + "local": 2, + "projection": [] + } + } + } + ] + } } ], "terminator": { - "kind": "Return", - "span": 4 + "kind": "Return" } } ], "locals": [ { - "mutability": "Mut", - "span": 8 + "mutability": "Mut" + }, + { + "mutability": "Not" }, { - "mutability": "Not", - "span": 9 + "mutability": "Mut" }, { - "mutability": "Not", - "span": 10 + "mutability": "Mut" }, { - "mutability": "Not", - "span": 11 + "mutability": "Mut" }, { - "mutability": "Not", - "span": 12 + "mutability": "Mut" }, { - "mutability": "Mut", - "span": 1 + "mutability": "Mut" }, { - "mutability": "Mut", - "span": 2 + "mutability": "Mut" }, { - "mutability": "Not", - "span": 2 + "mutability": "Mut" }, { - "mutability": "Not", - "span": 3 + "mutability": "Mut" } ], - "span": 13, "spread_arg": null, "var_debug_info": [ { "argument_index": 1, "composite": null, - "name": "main", + "name": "n", "source_info": { - "scope": 0, - "span": 9 + "scope": 0 }, "value": { "Place": { @@ -2353,12 +2048,11 @@ } }, { - "argument_index": 2, + "argument_index": null, "composite": null, - "name": "argc", + "name": "sum", "source_info": { - "scope": 0, - "span": 10 + "scope": 1 }, "value": { "Place": { @@ -2367,58 +2061,26 @@ } } }, - { - "argument_index": 3, - "composite": null, - "name": "argv", - "source_info": { - "scope": 0, - "span": 11 - }, - "value": { - "Place": { - "local": 3, - "projection": [] - } - } - }, - { - "argument_index": 4, - "composite": null, - "name": "sigpipe", - "source_info": { - "scope": 0, - "span": 12 - }, - "value": { - "Place": { - "local": 4, - "projection": [] - } - } - }, { "argument_index": null, "composite": null, - "name": "v", + "name": "counter", "source_info": { - "scope": 1, - "span": 6 + "scope": 2 }, "value": { "Place": { - "local": 0, + "local": 3, "projection": [] } } } ] }, - "id": 0, - "name": "std::rt::lang_start::<()>" + "name": "sum_to_n" } }, - "symbol_name": "_ZN3std2rt10lang_start17h" + "symbol_name": "_ZN8sum_to_n8sum_to_n17h" } ], "types": [ @@ -2467,54 +2129,6 @@ } } ], - [ - { - "EnumType": { - "discriminants": [ - 0, - 1 - ], - "fields": "elided", - "layout": { - "abi": { - "Scalar": { - "Initialized": { - "valid_range": { - "end": 18446744073709551615, - "start": 0 - }, - "value": { - "Int": { - "length": "I64", - "signed": true - } - } - } - } - }, - "abi_align": 8, - "fields": { - "Arbitrary": { - "offsets": [ - { - "num_bits": 0 - } - ] - } - }, - "size": { - "num_bits": 64 - }, - "variants": { - "Single": { - "index": 0 - } - } - }, - "name": "std::result::Result" - } - } - ], [ { "StructType": { @@ -2930,39 +2544,6 @@ } } ], - [ - { - "RefType": { - "layout": { - "abi": { - "Scalar": { - "Initialized": { - "valid_range": { - "end": 18446744073709551615, - "start": 1 - }, - "value": { - "Pointer": 0 - } - } - } - }, - "abi_align": 8, - "fields": "Primitive", - "size": { - "num_bits": 64 - }, - "variants": { - "Single": { - "index": 0 - } - } - }, - "mutability": "Not", - "pointee_type": "elided" - } - } - ], [ { "RefType": { diff --git a/tests/integration/programs/tuple-eq.smir.json.expected b/tests/integration/expected/nightly-2025-03-01/tuple-eq.smir.json.expected similarity index 80% rename from tests/integration/programs/tuple-eq.smir.json.expected rename to tests/integration/expected/nightly-2025-03-01/tuple-eq.smir.json.expected index 56bb496c..aa0f5297 100644 --- a/tests/integration/programs/tuple-eq.smir.json.expected +++ b/tests/integration/expected/nightly-2025-03-01/tuple-eq.smir.json.expected @@ -131,81 +131,66 @@ "mono_item_kind": { "MonoItemFn": { "body": { - "arg_count": 0, + "arg_count": 4, "blocks": [ { "statements": [ + { + "kind": { + "StorageLive": 5 + } + }, + { + "kind": { + "StorageLive": 7 + } + }, { "kind": { "Assign": [ { - "local": 1, + "local": 7, "projection": [] }, { "Aggregate": [ - "Tuple", - [ - { - "Constant": { - "const_": { - "id": 12, - "kind": { - "Allocated": { - "align": 4, - "bytes": [ - 42, - 0, - 0, - 0 - ], - "mutability": "Mut", - "provenance": { - "ptrs": [] - } - } - } + { + "Closure": [ + 0, + [ + { + "Type": 0 }, - "span": 69, - "user_ty": null - } - }, - { - "Constant": { - "const_": { - "id": 13, - "kind": { - "Allocated": { - "align": 4, - "bytes": [ - 99, - 0, - 0, - 0 - ], - "mutability": "Mut", - "provenance": { - "ptrs": [] - } - } - } + { + "Type": 0 }, - "span": 70, - "user_ty": null + { + "Type": 0 + }, + { + "Type": 0 + } + ] + ] + }, + [ + { + "Copy": { + "local": 1, + "projection": [] } } ] ] } ] - }, - "span": 71 + } }, { "kind": { "Assign": [ { - "local": 3, + "local": 6, "projection": [] }, { @@ -215,66 +200,55 @@ }, "Shared", { - "local": 1, + "local": 7, "projection": [] } ] } ] - }, - "span": 72 + } }, { "kind": { "Assign": [ { - "local": 4, + "local": 5, "projection": [] }, { - "Use": { - "Constant": { - "const_": { - "id": 14, - "kind": { - "Allocated": { - "align": 8, - "bytes": [ - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0 - ], - "mutability": "Mut", - "provenance": { - "ptrs": [ - [ - 0, - 0 - ] - ] - } - } - } - }, - "span": 73, - "user_ty": null - } - } + "Cast": [ + { + "PointerCoercion": "Unsize" + }, + { + "Copy": { + "local": 6, + "projection": [] + } + }, + 0 + ] } ] - }, - "span": 73 + } } ], "terminator": { "kind": { "Call": { "args": [ + { + "Move": { + "local": 5, + "projection": [] + } + }, + { + "Move": { + "local": 2, + "projection": [] + } + }, { "Move": { "local": 3, @@ -289,164 +263,75 @@ } ], "destination": { - "local": 2, + "local": 0, "projection": [] }, "func": { "Constant": { "const_": { - "id": 11, "kind": "ZeroSized" }, - "span": 68, "user_ty": null } }, "target": 1, "unwind": "Continue" } - }, - "span": 68 + } } }, { - "statements": [], - "terminator": { - "kind": { - "SwitchInt": { - "discr": { - "Move": { - "local": 2, - "projection": [] - } - }, - "targets": { - "branches": [ - [ - 0, - 3 - ] - ], - "otherwise": 2 - } + "statements": [ + { + "kind": { + "StorageDead": 5 } }, - "span": 68 - } - }, - { - "statements": [], - "terminator": { - "kind": "Return", - "span": 74 - } - }, - { - "statements": [], - "terminator": { - "kind": { - "Call": { - "args": [ - { - "Constant": { - "const_": { - "id": 16, - "kind": { - "Allocated": { - "align": 8, - "bytes": [ - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 33, - 0, - 0, - 0, - 0, - 0, - 0, - 0 - ], - "mutability": "Mut", - "provenance": { - "ptrs": [ - [ - 0, - 1 - ] - ] - } - } - } - }, - "span": 32, - "user_ty": null - } - } - ], - "destination": { - "local": 5, - "projection": [] - }, - "func": { - "Constant": { - "const_": { - "id": 15, - "kind": "ZeroSized" - }, - "span": 75, - "user_ty": null - } - }, - "target": null, - "unwind": "Continue" + { + "kind": { + "StorageDead": 7 } - }, - "span": 75 + } + ], + "terminator": { + "kind": "Return" } } ], "locals": [ { - "mutability": "Mut", - "span": 76 + "mutability": "Mut" + }, + { + "mutability": "Not" + }, + { + "mutability": "Not" }, { - "mutability": "Not", - "span": 77 + "mutability": "Not" }, { - "mutability": "Mut", - "span": 68 + "mutability": "Not" }, { - "mutability": "Mut", - "span": 72 + "mutability": "Mut" }, { - "mutability": "Mut", - "span": 73 + "mutability": "Not" }, { - "mutability": "Mut", - "span": 75 + "mutability": "Not" } ], - "span": 78, "spread_arg": null, "var_debug_info": [ { - "argument_index": null, + "argument_index": 1, "composite": null, - "name": "tup", + "name": "main", "source_info": { - "scope": 1, - "span": 77 + "scope": 0 }, "value": { "Place": { @@ -454,49 +339,55 @@ "projection": [] } } - } - ] - }, - "id": 8, - "name": "main" - } - }, - "symbol_name": "_ZN8tuple_eq4main17h" - }, - { - "details": null, - "mono_item_kind": { - "MonoItemFn": { - "body": { - "arg_count": 1, - "blocks": [ + }, { - "statements": [], - "terminator": { - "kind": "Return", - "span": 53 + "argument_index": 2, + "composite": null, + "name": "argc", + "source_info": { + "scope": 0 + }, + "value": { + "Place": { + "local": 2, + "projection": [] + } } - } - ], - "locals": [ + }, { - "mutability": "Mut", - "span": 53 + "argument_index": 3, + "composite": null, + "name": "argv", + "source_info": { + "scope": 0 + }, + "value": { + "Place": { + "local": 3, + "projection": [] + } + } }, { - "mutability": "Not", - "span": 53 + "argument_index": 4, + "composite": null, + "name": "sigpipe", + "source_info": { + "scope": 0 + }, + "value": { + "Place": { + "local": 4, + "projection": [] + } + } } - ], - "span": 53, - "spread_arg": null, - "var_debug_info": [] + ] }, - "id": 5, - "name": "std::ptr::drop_in_place::<{closure@std::rt::lang_start<()>::{closure#0}}>" + "name": "std::rt::lang_start::<()>" } }, - "symbol_name": "_ZN4core3ptr85drop_in_place$LT$std..rt..lang_start$LT$$LP$$RP$$GT$..$u7b$$u7b$closure$u7d$$u7d$$GT$17h" + "symbol_name": "_ZN3std2rt10lang_start17h" }, { "details": null, @@ -506,63 +397,94 @@ "arg_count": 1, "blocks": [ { - "statements": [], + "statements": [ + { + "kind": { + "StorageLive": 2 + } + }, + { + "kind": { + "StorageLive": 3 + } + }, + { + "kind": { + "StorageLive": 4 + } + }, + { + "kind": { + "Assign": [ + { + "local": 4, + "projection": [] + }, + { + "Use": { + "Copy": { + "local": 1, + "projection": [ + "Deref", + { + "Field": [ + 0, + 0 + ] + } + ] + } + } + } + ] + } + } + ], "terminator": { "kind": { "Call": { "args": [ { "Move": { - "local": 1, + "local": 4, "projection": [] } - }, - { - "Constant": { - "const_": { - "id": 4, - "kind": "ZeroSized" - }, - "span": 32, - "user_ty": null - } } ], "destination": { - "local": 0, + "local": 3, "projection": [] }, "func": { "Constant": { "const_": { - "id": 3, "kind": "ZeroSized" }, - "span": 31, "user_ty": null } }, "target": 1, "unwind": "Continue" } - }, - "span": 33 + } } }, { - "statements": [], + "statements": [ + { + "kind": { + "StorageDead": 4 + } + } + ], "terminator": { "kind": { "Call": { "args": [ { - "Constant": { - "const_": { - "id": 4, - "kind": "ZeroSized" - }, - "span": 32, - "user_ty": null + "Move": { + "local": 3, + "projection": [] } } ], @@ -573,296 +495,221 @@ "func": { "Constant": { "const_": { - "id": 5, "kind": "ZeroSized" }, - "span": 34, "user_ty": null } }, "target": 2, - "unwind": "Unreachable" + "unwind": "Continue" } - }, - "span": 35 - } - }, - { - "statements": [], - "terminator": { - "kind": "Return", - "span": 36 - } - } - ], - "locals": [ - { - "mutability": "Mut", - "span": 37 - }, - { - "mutability": "Not", - "span": 38 - }, - { - "mutability": "Not", - "span": 39 - } - ], - "span": 42, - "spread_arg": null, - "var_debug_info": [ - { - "argument_index": 1, - "composite": null, - "name": "f", - "source_info": { - "scope": 0, - "span": 38 - }, - "value": { - "Place": { - "local": 1, - "projection": [] - } - } - }, - { - "argument_index": null, - "composite": null, - "name": "result", - "source_info": { - "scope": 1, - "span": 40 - }, - "value": { - "Place": { - "local": 0, - "projection": [] } } }, - { - "argument_index": 1, - "composite": null, - "name": "dummy", - "source_info": { - "scope": 2, - "span": 41 - }, - "value": { - "Const": { - "const_": { - "id": 4, - "kind": "ZeroSized" - }, - "span": 32, - "user_ty": null - } - } - } - ] - }, - "id": 2, - "name": "std::sys::backtrace::__rust_begin_short_backtrace::" - } - }, - "symbol_name": "_ZN3std3sys9backtrace28__rust_begin_short_backtrace17h" - }, - { - "details": null, - "mono_item_kind": { - "MonoItemFn": { - "body": { - "arg_count": 1, - "blocks": [ { "statements": [ + { + "kind": { + "StorageDead": 3 + } + }, + { + "kind": { + "StorageLive": 5 + } + }, { "kind": { "Assign": [ { - "local": 0, + "local": 5, "projection": [] }, { "Use": { - "Constant": { - "const_": { - "id": 10, - "kind": { - "Allocated": { - "align": 1, - "bytes": [ - 0 - ], - "mutability": "Mut", - "provenance": { - "ptrs": [] - } - } + "Copy": { + "local": 2, + "projection": [ + { + "Field": [ + 0, + 0 + ] + }, + { + "Field": [ + 0, + 0 + ] } - }, - "span": 64, - "user_ty": null + ] } } } ] - }, - "span": 64 + } + }, + { + "kind": { + "Assign": [ + { + "local": 0, + "projection": [] + }, + { + "Cast": [ + "IntToInt", + { + "Move": { + "local": 5, + "projection": [] + } + }, + 0 + ] + } + ] + } + }, + { + "kind": { + "StorageDead": 5 + } + }, + { + "kind": { + "StorageDead": 2 + } } ], "terminator": { - "kind": "Return", - "span": 63 + "kind": "Return" } } ], "locals": [ { - "mutability": "Mut", - "span": 65 + "mutability": "Mut" + }, + { + "mutability": "Mut" + }, + { + "mutability": "Mut" + }, + { + "mutability": "Mut" }, { - "mutability": "Not", - "span": 66 + "mutability": "Mut" + }, + { + "mutability": "Mut" } ], - "span": 67, "spread_arg": null, "var_debug_info": [ { - "argument_index": 1, + "argument_index": null, "composite": null, - "name": "self", + "name": "main", "source_info": { - "scope": 0, - "span": 66 + "scope": 0 }, "value": { - "Const": { - "const_": { - "id": 4, - "kind": "ZeroSized" - }, - "span": 32, - "user_ty": null - } - } - } - ] - }, - "id": 7, - "name": "<() as std::process::Termination>::report" - } - }, - "symbol_name": "_ZN54_$LT$$LP$$RP$$u20$as$u20$std..process..Termination$GT$6report17h" - }, - { - "details": null, - "mono_item_kind": { - "MonoItemFn": { - "body": { - "arg_count": 1, - "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 + "Place": { + "local": 1, + "projection": [ + "Deref", + { + "Field": [ + 0, + 0 + ] + } + ] } - ], + } + }, + { + "argument_index": 1, + "composite": null, + "name": "self", + "source_info": { + "scope": 1 + }, + "value": { + "Place": { + "local": 2, + "projection": [] + } + } + } + ] + }, + "name": "std::rt::lang_start::<()>::{closure#0}" + } + }, + "symbol_name": "_ZN3std2rt10lang_start28_$u7b$$u7b$closure$u7d$$u7d$17h" + }, + { + "details": null, + "mono_item_kind": { + "MonoItemFn": { + "body": { + "arg_count": 1, + "blocks": [ + { + "statements": [], "terminator": { "kind": { "Call": { "args": [ { "Move": { - "local": 4, + "local": 1, "projection": [] } + }, + { + "Constant": { + "const_": { + "kind": "ZeroSized" + }, + "user_ty": null + } } ], "destination": { - "local": 3, + "local": 0, "projection": [] }, "func": { "Constant": { "const_": { - "id": 1, "kind": "ZeroSized" }, - "span": 14, "user_ty": null } }, "target": 1, "unwind": "Continue" } - }, - "span": 15 + } } }, { - "statements": [ - { - "kind": { - "StorageDead": 4 - }, - "span": 19 - } - ], + "statements": [], "terminator": { "kind": { "Call": { "args": [ { - "Move": { - "local": 3, - "projection": [] + "Constant": { + "const_": { + "kind": "ZeroSized" + }, + "user_ty": null } } ], @@ -873,75 +720,132 @@ "func": { "Constant": { "const_": { - "id": 2, "kind": "ZeroSized" }, - "span": 18, "user_ty": null } }, "target": 2, - "unwind": "Continue" + "unwind": "Unreachable" } - }, - "span": 16 + } } }, { - "statements": [ - { - "kind": { - "StorageDead": 3 + "statements": [], + "terminator": { + "kind": "Return" + } + } + ], + "locals": [ + { + "mutability": "Mut" + }, + { + "mutability": "Not" + }, + { + "mutability": "Not" + } + ], + "spread_arg": null, + "var_debug_info": [ + { + "argument_index": 1, + "composite": null, + "name": "f", + "source_info": { + "scope": 0 + }, + "value": { + "Place": { + "local": 1, + "projection": [] + } + } + }, + { + "argument_index": null, + "composite": null, + "name": "result", + "source_info": { + "scope": 1 + }, + "value": { + "Place": { + "local": 0, + "projection": [] + } + } + }, + { + "argument_index": 1, + "composite": null, + "name": "dummy", + "source_info": { + "scope": 2 + }, + "value": { + "Const": { + "const_": { + "kind": "ZeroSized" }, - "span": 21 - }, + "user_ty": null + } + } + } + ] + }, + "name": "std::sys::backtrace::__rust_begin_short_backtrace::" + } + }, + "symbol_name": "_ZN3std3sys9backtrace28__rust_begin_short_backtrace17h" + }, + { + "details": null, + "mono_item_kind": { + "MonoItemFn": { + "body": { + "arg_count": 2, + "blocks": [ + { + "statements": [ { "kind": { - "StorageLive": 5 - }, - "span": 22 + "StorageLive": 3 + } }, { "kind": { "Assign": [ { - "local": 5, + "local": 3, "projection": [] }, { - "Ref": [ - { - "kind": "ReErased" - }, - "Shared", - { - "local": 2, + "Use": { + "Copy": { + "local": 1, "projection": [ - { - "Field": [ - 0, - 15 - ] - } + "Deref" ] } - ] + } } ] - }, - "span": 22 + } }, { "kind": { - "StorageLive": 6 - }, - "span": 23 + "StorageLive": 4 + } }, { "kind": { "Assign": [ { - "local": 6, + "local": 4, "projection": [] }, { @@ -949,25 +853,13 @@ "Copy": { "local": 2, "projection": [ - { - "Field": [ - 0, - 15 - ] - }, - { - "Field": [ - 0, - 9 - ] - } + "Deref" ] } } } ] - }, - "span": 23 + } }, { "kind": { @@ -977,139 +869,94 @@ "projection": [] }, { - "Cast": [ - "IntToInt", + "BinaryOp": [ + "Eq", { "Move": { - "local": 6, + "local": 3, "projection": [] } }, - 16 + { + "Move": { + "local": 4, + "projection": [] + } + } ] } ] - }, - "span": 24 - }, - { - "kind": { - "StorageDead": 6 - }, - "span": 25 + } }, { "kind": { - "StorageDead": 5 - }, - "span": 26 + "StorageDead": 4 + } }, { "kind": { - "StorageDead": 2 - }, - "span": 27 + "StorageDead": 3 + } } ], "terminator": { - "kind": "Return", - "span": 20 + "kind": "Return" } } ], - "locals": [ - { - "mutability": "Mut", - "span": 28 - }, - { - "mutability": "Mut", - "span": 3 - }, - { - "mutability": "Mut", - "span": 16 - }, - { - "mutability": "Mut", - "span": 15 - }, - { - "mutability": "Mut", - "span": 17 - }, - { - "mutability": "Mut", - "span": 22 - }, - { - "mutability": "Mut", - "span": 23 - } - ], - "span": 3, - "spread_arg": null, - "var_debug_info": [ - { - "argument_index": null, - "composite": null, - "name": "main", - "source_info": { - "scope": 0, - "span": 9 - }, - "value": { - "Place": { - "local": 1, - "projection": [ - "Deref", - { - "Field": [ - 0, - 7 - ] - } - ] - } - } + "locals": [ + { + "mutability": "Mut" + }, + { + "mutability": "Not" + }, + { + "mutability": "Not" + }, + { + "mutability": "Mut" }, + { + "mutability": "Mut" + } + ], + "spread_arg": null, + "var_debug_info": [ { "argument_index": 1, "composite": null, "name": "self", "source_info": { - "scope": 1, - "span": 29 + "scope": 0 }, "value": { "Place": { - "local": 2, + "local": 1, "projection": [] } } }, { - "argument_index": 1, + "argument_index": 2, "composite": null, - "name": "self", + "name": "other", "source_info": { - "scope": 2, - "span": 30 + "scope": 0 }, "value": { "Place": { - "local": 5, + "local": 2, "projection": [] } } } ] }, - "id": 1, - "name": "std::rt::lang_start::<()>::{closure#0}" + "name": "std::cmp::impls::::eq" } }, - "symbol_name": "_ZN3std2rt10lang_start28_$u7b$$u7b$closure$u7d$$u7d$17h" + "symbol_name": "_ZN4core3cmp5impls54_$LT$impl$u20$core..cmp..PartialEq$u20$for$u20$i32$GT$2eq17h" }, { "details": null, @@ -1123,55 +970,65 @@ "terminator": { "kind": { "Call": { - "args": [], + "args": [ + { + "Move": { + "local": 1, + "projection": [ + "Deref" + ] + } + }, + { + "Move": { + "local": 2, + "projection": [] + } + } + ], "destination": { "local": 0, "projection": [] }, "func": { - "Move": { - "local": 1, - "projection": [] + "Constant": { + "const_": { + "kind": "ZeroSized" + }, + "user_ty": null } }, "target": 1, "unwind": "Continue" } - }, - "span": 52 + } } }, { "statements": [], "terminator": { - "kind": "Return", - "span": 52 + "kind": "Return" } } ], "locals": [ { - "mutability": "Mut", - "span": 52 + "mutability": "Mut" }, { - "mutability": "Not", - "span": 52 + "mutability": "Not" }, { - "mutability": "Not", - "span": 52 + "mutability": "Not" } ], - "span": 52, "spread_arg": 2, "var_debug_info": [] }, - "id": 4, - "name": ">::call_once" + "name": "<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once" } }, - "symbol_name": "_ZN4core3ops8function6FnOnce9call_once17h" + "symbol_name": "_ZN4core3ops8function6FnOnce40call_once$u7b$$u7b$vtable.shim$u7d$$u7d$17h" }, { "details": null, @@ -1185,74 +1042,48 @@ "terminator": { "kind": { "Call": { - "args": [ - { - "Move": { - "local": 1, - "projection": [ - "Deref" - ] - } - }, - { - "Move": { - "local": 2, - "projection": [] - } - } - ], + "args": [], "destination": { "local": 0, "projection": [] }, "func": { - "Constant": { - "const_": { - "id": 6, - "kind": "ZeroSized" - }, - "span": 52, - "user_ty": null + "Move": { + "local": 1, + "projection": [] } }, "target": 1, "unwind": "Continue" } - }, - "span": 52 + } } }, { "statements": [], "terminator": { - "kind": "Return", - "span": 52 + "kind": "Return" } } ], "locals": [ { - "mutability": "Mut", - "span": 52 + "mutability": "Mut" }, { - "mutability": "Not", - "span": 52 + "mutability": "Not" }, { - "mutability": "Not", - "span": 52 + "mutability": "Not" } ], - "span": 52, "spread_arg": 2, "var_debug_info": [] }, - "id": 4, - "name": "<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once" + "name": ">::call_once" } }, - "symbol_name": "_ZN4core3ops8function6FnOnce40call_once$u7b$$u7b$vtable.shim$u7d$$u7d$17h" + "symbol_name": "_ZN4core3ops8function6FnOnce9call_once17h" }, { "details": null, @@ -1287,8 +1118,7 @@ ] } ] - }, - "span": 52 + } } ], "terminator": { @@ -1315,10 +1145,8 @@ "func": { "Constant": { "const_": { - "id": 7, "kind": "ZeroSized" }, - "span": 52, "user_ty": null } }, @@ -1327,8 +1155,7 @@ "Cleanup": 3 } } - }, - "span": 52 + } } }, { @@ -1343,15 +1170,13 @@ "target": 2, "unwind": "Continue" } - }, - "span": 52 + } } }, { "statements": [], "terminator": { - "kind": "Return", - "span": 52 + "kind": "Return" } }, { @@ -1366,41 +1191,33 @@ "target": 4, "unwind": "Terminate" } - }, - "span": 52 + } } }, { "statements": [], "terminator": { - "kind": "Resume", - "span": 52 + "kind": "Resume" } } ], "locals": [ { - "mutability": "Mut", - "span": 52 + "mutability": "Mut" }, { - "mutability": "Not", - "span": 52 + "mutability": "Not" }, { - "mutability": "Not", - "span": 52 + "mutability": "Not" }, { - "mutability": "Not", - "span": 52 + "mutability": "Not" } ], - "span": 52, "spread_arg": 2, "var_debug_info": [] }, - "id": 4, "name": "<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once" } }, @@ -1411,173 +1228,30 @@ "mono_item_kind": { "MonoItemFn": { "body": { - "arg_count": 2, + "arg_count": 1, "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 - } - ], + "statements": [], "terminator": { - "kind": "Return", - "span": 43 + "kind": "Return" } } ], "locals": [ { - "mutability": "Mut", - "span": 48 - }, - { - "mutability": "Not", - "span": 49 - }, - { - "mutability": "Not", - "span": 50 - }, - { - "mutability": "Mut", - "span": 44 + "mutability": "Mut" }, { - "mutability": "Mut", - "span": 45 + "mutability": "Not" } ], - "span": 51, "spread_arg": null, - "var_debug_info": [ - { - "argument_index": 1, - "composite": null, - "name": "self", - "source_info": { - "scope": 0, - "span": 49 - }, - "value": { - "Place": { - "local": 1, - "projection": [] - } - } - }, - { - "argument_index": 2, - "composite": null, - "name": "other", - "source_info": { - "scope": 0, - "span": 50 - }, - "value": { - "Place": { - "local": 2, - "projection": [] - } - } - } - ] + "var_debug_info": [] }, - "id": 3, - "name": "std::cmp::impls::::eq" + "name": "std::ptr::drop_in_place::<{closure@std::rt::lang_start<()>::{closure#0}}>" } }, - "symbol_name": "_ZN4core3cmp5impls54_$LT$impl$u20$core..cmp..PartialEq$u20$for$u20$i32$GT$2eq17h" + "symbol_name": "_ZN4core3ptr85drop_in_place$LT$std..rt..lang_start$LT$$LP$$RP$$GT$..$u7b$$u7b$closure$u7d$$u7d$$GT$17h" }, { "details": null, @@ -1591,14 +1265,12 @@ { "kind": { "StorageLive": 3 - }, - "span": 54 + } }, { "kind": { "StorageLive": 4 - }, - "span": 55 + } }, { "kind": { @@ -1620,7 +1292,7 @@ { "Field": [ 0, - 16 + 0 ] } ] @@ -1628,14 +1300,12 @@ ] } ] - }, - "span": 55 + } }, { "kind": { "StorageLive": 5 - }, - "span": 56 + } }, { "kind": { @@ -1657,7 +1327,7 @@ { "Field": [ 0, - 16 + 0 ] } ] @@ -1665,8 +1335,7 @@ ] } ] - }, - "span": 56 + } } ], "terminator": { @@ -1693,18 +1362,15 @@ "func": { "Constant": { "const_": { - "id": 8, "kind": "ZeroSized" }, - "span": 54, "user_ty": null } }, "target": 1, "unwind": "Continue" } - }, - "span": 54 + } } }, { @@ -1728,8 +1394,7 @@ "otherwise": 2 } } - }, - "span": 54 + } } }, { @@ -1737,20 +1402,17 @@ { "kind": { "StorageDead": 5 - }, - "span": 57 + } }, { "kind": { "StorageDead": 4 - }, - "span": 57 + } }, { "kind": { "StorageLive": 6 - }, - "span": 55 + } }, { "kind": { @@ -1772,7 +1434,7 @@ { "Field": [ 1, - 16 + 0 ] } ] @@ -1780,14 +1442,12 @@ ] } ] - }, - "span": 55 + } }, { "kind": { "StorageLive": 7 - }, - "span": 56 + } }, { "kind": { @@ -1809,7 +1469,7 @@ { "Field": [ 1, - 16 + 0 ] } ] @@ -1817,8 +1477,7 @@ ] } ] - }, - "span": 56 + } } ], "terminator": { @@ -1845,18 +1504,15 @@ "func": { "Constant": { "const_": { - "id": 8, "kind": "ZeroSized" }, - "span": 54, "user_ty": null } }, "target": 4, "unwind": "Continue" } - }, - "span": 54 + } } }, { @@ -1864,14 +1520,12 @@ { "kind": { "StorageDead": 5 - }, - "span": 57 + } }, { "kind": { "StorageDead": 4 - }, - "span": 57 + } }, { "kind": { @@ -1884,7 +1538,6 @@ "Use": { "Constant": { "const_": { - "id": 9, "kind": { "Allocated": { "align": 1, @@ -1898,14 +1551,12 @@ } } }, - "span": 54, "user_ty": null } } } ] - }, - "span": 54 + } } ], "terminator": { @@ -1913,8 +1564,7 @@ "Goto": { "target": 5 } - }, - "span": 54 + } } }, { @@ -1922,14 +1572,12 @@ { "kind": { "StorageDead": 7 - }, - "span": 57 + } }, { "kind": { "StorageDead": 6 - }, - "span": 57 + } } ], "terminator": { @@ -1937,8 +1585,7 @@ "Goto": { "target": 5 } - }, - "span": 54 + } } }, { @@ -1946,51 +1593,40 @@ { "kind": { "StorageDead": 3 - }, - "span": 57 + } } ], "terminator": { - "kind": "Return", - "span": 58 + "kind": "Return" } } ], "locals": [ { - "mutability": "Mut", - "span": 59 + "mutability": "Mut" }, { - "mutability": "Not", - "span": 60 + "mutability": "Not" }, { - "mutability": "Not", - "span": 61 + "mutability": "Not" }, { - "mutability": "Mut", - "span": 54 + "mutability": "Mut" }, { - "mutability": "Mut", - "span": 55 + "mutability": "Mut" }, { - "mutability": "Mut", - "span": 56 + "mutability": "Mut" }, { - "mutability": "Mut", - "span": 55 + "mutability": "Mut" }, { - "mutability": "Mut", - "span": 56 + "mutability": "Mut" } ], - "span": 62, "spread_arg": null, "var_debug_info": [ { @@ -1998,8 +1634,7 @@ "composite": null, "name": "self", "source_info": { - "scope": 0, - "span": 60 + "scope": 0 }, "value": { "Place": { @@ -2013,8 +1648,7 @@ "composite": null, "name": "other", "source_info": { - "scope": 0, - "span": 61 + "scope": 0 }, "value": { "Place": { @@ -2025,7 +1659,6 @@ } ] }, - "id": 6, "name": "core::tuple::::eq" } }, @@ -2036,75 +1669,138 @@ "mono_item_kind": { "MonoItemFn": { "body": { - "arg_count": 4, + "arg_count": 1, "blocks": [ { "statements": [ { "kind": { - "StorageLive": 5 - }, - "span": 1 - }, - { - "kind": { - "StorageLive": 6 - }, - "span": 2 - }, - { - "kind": { - "StorageLive": 8 - }, - "span": 3 - }, + "Assign": [ + { + "local": 0, + "projection": [] + }, + { + "Use": { + "Constant": { + "const_": { + "kind": { + "Allocated": { + "align": 1, + "bytes": [ + 0 + ], + "mutability": "Mut", + "provenance": { + "ptrs": [] + } + } + } + }, + "user_ty": null + } + } + } + ] + } + } + ], + "terminator": { + "kind": "Return" + } + } + ], + "locals": [ + { + "mutability": "Mut" + }, + { + "mutability": "Not" + } + ], + "spread_arg": null, + "var_debug_info": [] + }, + "name": "<() as std::process::Termination>::report" + } + }, + "symbol_name": "_ZN54_$LT$$LP$$RP$$u20$as$u20$std..process..Termination$GT$6report17h" + }, + { + "details": null, + "mono_item_kind": { + "MonoItemFn": { + "body": { + "arg_count": 0, + "blocks": [ + { + "statements": [ { "kind": { "Assign": [ { - "local": 8, + "local": 1, "projection": [] }, { "Aggregate": [ - { - "Closure": [ - 1, - [ - { - "Type": 1 - }, - { - "Type": 2 - }, - { - "Type": 3 - }, - { - "Type": 4 - } - ] - ] - }, + "Tuple", [ { - "Copy": { - "local": 1, - "projection": [] + "Constant": { + "const_": { + "kind": { + "Allocated": { + "align": 4, + "bytes": [ + 42, + 0, + 0, + 0 + ], + "mutability": "Mut", + "provenance": { + "ptrs": [] + } + } + } + }, + "user_ty": null + } + }, + { + "Constant": { + "const_": { + "kind": { + "Allocated": { + "align": 4, + "bytes": [ + 99, + 0, + 0, + 0 + ], + "mutability": "Mut", + "provenance": { + "ptrs": [] + } + } + } + }, + "user_ty": null } } ] ] } ] - }, - "span": 3 + } }, { "kind": { "Assign": [ { - "local": 7, + "local": 3, "projection": [] }, { @@ -2114,67 +1810,166 @@ }, "Shared", { - "local": 8, + "local": 1, "projection": [] } ] } ] - }, - "span": 2 + } }, { "kind": { "Assign": [ { - "local": 6, + "local": 4, "projection": [] }, { - "Cast": [ - { - "PointerCoercion": "Unsize" - }, - { - "Copy": { - "local": 7, - "projection": [] - } - }, - 5 - ] + "Use": { + "Constant": { + "const_": { + "kind": { + "Allocated": { + "align": 8, + "bytes": [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "mutability": "Mut", + "provenance": { + "ptrs": [ + [ + 0, + 0 + ] + ] + } + } + } + }, + "user_ty": null + } + } } ] - }, - "span": 2 + } + } + ], + "terminator": { + "kind": { + "Call": { + "args": [ + { + "Move": { + "local": 3, + "projection": [] + } + }, + { + "Move": { + "local": 4, + "projection": [] + } + } + ], + "destination": { + "local": 2, + "projection": [] + }, + "func": { + "Constant": { + "const_": { + "kind": "ZeroSized" + }, + "user_ty": null + } + }, + "target": 1, + "unwind": "Continue" + } + } + } + }, + { + "statements": [], + "terminator": { + "kind": { + "SwitchInt": { + "discr": { + "Move": { + "local": 2, + "projection": [] + } + }, + "targets": { + "branches": [ + [ + 0, + 3 + ] + ], + "otherwise": 2 + } + } } - ], + } + }, + { + "statements": [], + "terminator": { + "kind": "Return" + } + }, + { + "statements": [], "terminator": { "kind": { "Call": { "args": [ { - "Move": { - "local": 6, - "projection": [] - } - }, - { - "Move": { - "local": 2, - "projection": [] - } - }, - { - "Move": { - "local": 3, - "projection": [] - } - }, - { - "Move": { - "local": 4, - "projection": [] + "Constant": { + "const_": { + "kind": { + "Allocated": { + "align": 8, + "bytes": [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 33, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "mutability": "Mut", + "provenance": { + "ptrs": [ + [ + 0, + 1 + ] + ] + } + } + } + }, + "user_ty": null } } ], @@ -2185,199 +1980,60 @@ "func": { "Constant": { "const_": { - "id": 0, "kind": "ZeroSized" }, - "span": 0, "user_ty": null } }, - "target": 1, + "target": null, "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": [ { - "mutability": "Mut", - "span": 8 - }, - { - "mutability": "Not", - "span": 9 - }, - { - "mutability": "Not", - "span": 10 + "mutability": "Mut" }, { - "mutability": "Not", - "span": 11 + "mutability": "Not" }, { - "mutability": "Not", - "span": 12 + "mutability": "Mut" }, { - "mutability": "Mut", - "span": 1 + "mutability": "Mut" }, { - "mutability": "Mut", - "span": 2 + "mutability": "Mut" }, { - "mutability": "Not", - "span": 2 - }, - { - "mutability": "Not", - "span": 3 + "mutability": "Mut" } ], - "span": 13, "spread_arg": null, "var_debug_info": [ - { - "argument_index": 1, - "composite": null, - "name": "main", - "source_info": { - "scope": 0, - "span": 9 - }, - "value": { - "Place": { - "local": 1, - "projection": [] - } - } - }, - { - "argument_index": 2, - "composite": null, - "name": "argc", - "source_info": { - "scope": 0, - "span": 10 - }, - "value": { - "Place": { - "local": 2, - "projection": [] - } - } - }, - { - "argument_index": 3, - "composite": null, - "name": "argv", - "source_info": { - "scope": 0, - "span": 11 - }, - "value": { - "Place": { - "local": 3, - "projection": [] - } - } - }, - { - "argument_index": 4, - "composite": null, - "name": "sigpipe", - "source_info": { - "scope": 0, - "span": 12 - }, - "value": { - "Place": { - "local": 4, - "projection": [] - } - } - }, { "argument_index": null, "composite": null, - "name": "v", + "name": "tup", "source_info": { - "scope": 1, - "span": 6 + "scope": 1 }, "value": { "Place": { - "local": 0, + "local": 1, "projection": [] } } } ] }, - "id": 0, - "name": "std::rt::lang_start::<()>" + "name": "main" } }, - "symbol_name": "_ZN3std2rt10lang_start17h" + "symbol_name": "_ZN8tuple_eq4main17h" } ], "types": [ @@ -2419,54 +2075,6 @@ } } ], - [ - { - "EnumType": { - "discriminants": [ - 0, - 1 - ], - "fields": "elided", - "layout": { - "abi": { - "Scalar": { - "Initialized": { - "valid_range": { - "end": 18446744073709551615, - "start": 0 - }, - "value": { - "Int": { - "length": "I64", - "signed": true - } - } - } - } - }, - "abi_align": 8, - "fields": { - "Arbitrary": { - "offsets": [ - { - "num_bits": 0 - } - ] - } - }, - "size": { - "num_bits": 64 - }, - "variants": { - "Single": { - "index": 0 - } - } - }, - "name": "std::result::Result" - } - } - ], [ { "StructType": { @@ -2948,39 +2556,6 @@ } } ], - [ - { - "RefType": { - "layout": { - "abi": { - "Scalar": { - "Initialized": { - "valid_range": { - "end": 18446744073709551615, - "start": 1 - }, - "value": { - "Pointer": 0 - } - } - } - }, - "abi_align": 8, - "fields": "Primitive", - "size": { - "num_bits": 64 - }, - "variants": { - "Single": { - "index": 0 - } - } - }, - "mutability": "Not", - "pointee_type": "elided" - } - } - ], [ { "RefType": { diff --git a/tests/integration/programs/tuples-simple.smir.json.expected b/tests/integration/expected/nightly-2025-03-01/tuples-simple.smir.json.expected similarity index 78% rename from tests/integration/programs/tuples-simple.smir.json.expected rename to tests/integration/expected/nightly-2025-03-01/tuples-simple.smir.json.expected index cb5dba84..0af340a2 100644 --- a/tests/integration/programs/tuples-simple.smir.json.expected +++ b/tests/integration/expected/nightly-2025-03-01/tuples-simple.smir.json.expected @@ -117,7 +117,6 @@ { "Constant": { "const_": { - "id": 9, "kind": { "Allocated": { "align": 4, @@ -134,14 +133,12 @@ } } }, - "span": 51, "user_ty": null } }, { "Constant": { "const_": { - "id": 10, "kind": { "Allocated": { "align": 4, @@ -158,7 +155,6 @@ } } }, - "span": 52, "user_ty": null } } @@ -166,8 +162,7 @@ ] } ] - }, - "span": 53 + } }, { "kind": { @@ -184,7 +179,7 @@ { "Field": [ 0, - 16 + 0 ] } ] @@ -192,8 +187,7 @@ } } ] - }, - "span": 54 + } }, { "kind": { @@ -210,7 +204,7 @@ { "Field": [ 1, - 16 + 0 ] } ] @@ -218,8 +212,7 @@ } } ] - }, - "span": 55 + } }, { "kind": { @@ -246,8 +239,7 @@ ] } ] - }, - "span": 50 + } } ], "terminator": { @@ -269,15 +261,13 @@ "otherwise": 1 } } - }, - "span": 50 + } } }, { "statements": [], "terminator": { - "kind": "Return", - "span": 56 + "kind": "Return" } }, { @@ -289,7 +279,6 @@ { "Constant": { "const_": { - "id": 12, "kind": { "Allocated": { "align": 8, @@ -323,7 +312,6 @@ } } }, - "span": 32, "user_ty": null } } @@ -335,48 +323,38 @@ "func": { "Constant": { "const_": { - "id": 11, "kind": "ZeroSized" }, - "span": 57, "user_ty": null } }, "target": null, "unwind": "Continue" } - }, - "span": 57 + } } } ], "locals": [ { - "mutability": "Mut", - "span": 58 + "mutability": "Mut" }, { - "mutability": "Not", - "span": 59 + "mutability": "Not" }, { - "mutability": "Mut", - "span": 50 + "mutability": "Mut" }, { - "mutability": "Mut", - "span": 54 + "mutability": "Mut" }, { - "mutability": "Mut", - "span": 55 + "mutability": "Mut" }, { - "mutability": "Mut", - "span": 57 + "mutability": "Mut" } ], - "span": 60, "spread_arg": null, "var_debug_info": [ { @@ -384,8 +362,7 @@ "composite": null, "name": "tup", "source_info": { - "scope": 1, - "span": 59 + "scope": 1 }, "value": { "Place": { @@ -396,7 +373,6 @@ } ] }, - "id": 6, "name": "main" } }, @@ -407,63 +383,134 @@ "mono_item_kind": { "MonoItemFn": { "body": { - "arg_count": 1, - "blocks": [ - { - "statements": [], - "terminator": { - "kind": "Return", - "span": 44 - } - } - ], - "locals": [ - { - "mutability": "Mut", - "span": 44 - }, - { - "mutability": "Not", - "span": 44 - } - ], - "span": 44, - "spread_arg": null, - "var_debug_info": [] - }, - "id": 4, - "name": "std::ptr::drop_in_place::<{closure@std::rt::lang_start<()>::{closure#0}}>" - } - }, - "symbol_name": "_ZN4core3ptr85drop_in_place$LT$std..rt..lang_start$LT$$LP$$RP$$GT$..$u7b$$u7b$closure$u7d$$u7d$$GT$17h" - }, - { - "details": null, - "mono_item_kind": { - "MonoItemFn": { - "body": { - "arg_count": 1, + "arg_count": 4, "blocks": [ { - "statements": [], + "statements": [ + { + "kind": { + "StorageLive": 5 + } + }, + { + "kind": { + "StorageLive": 7 + } + }, + { + "kind": { + "Assign": [ + { + "local": 7, + "projection": [] + }, + { + "Aggregate": [ + { + "Closure": [ + 0, + [ + { + "Type": 0 + }, + { + "Type": 0 + }, + { + "Type": 0 + }, + { + "Type": 0 + } + ] + ] + }, + [ + { + "Copy": { + "local": 1, + "projection": [] + } + } + ] + ] + } + ] + } + }, + { + "kind": { + "Assign": [ + { + "local": 6, + "projection": [] + }, + { + "Ref": [ + { + "kind": "ReErased" + }, + "Shared", + { + "local": 7, + "projection": [] + } + ] + } + ] + } + }, + { + "kind": { + "Assign": [ + { + "local": 5, + "projection": [] + }, + { + "Cast": [ + { + "PointerCoercion": "Unsize" + }, + { + "Copy": { + "local": 6, + "projection": [] + } + }, + 0 + ] + } + ] + } + } + ], "terminator": { "kind": { "Call": { "args": [ { "Move": { - "local": 1, + "local": 5, "projection": [] } }, { - "Constant": { - "const_": { - "id": 4, - "kind": "ZeroSized" - }, - "span": 32, - "user_ty": null + "Move": { + "local": 2, + "projection": [] + } + }, + { + "Move": { + "local": 3, + "projection": [] + } + }, + { + "Move": { + "local": 4, + "projection": [] } } ], @@ -474,90 +521,69 @@ "func": { "Constant": { "const_": { - "id": 3, "kind": "ZeroSized" }, - "span": 31, "user_ty": null } }, "target": 1, "unwind": "Continue" } - }, - "span": 33 + } } }, { - "statements": [], - "terminator": { - "kind": { - "Call": { - "args": [ - { - "Constant": { - "const_": { - "id": 4, - "kind": "ZeroSized" - }, - "span": 32, - "user_ty": null - } - } - ], - "destination": { - "local": 2, - "projection": [] - }, - "func": { - "Constant": { - "const_": { - "id": 5, - "kind": "ZeroSized" - }, - "span": 34, - "user_ty": null - } - }, - "target": 2, - "unwind": "Unreachable" + "statements": [ + { + "kind": { + "StorageDead": 5 } }, - "span": 35 - } - }, - { - "statements": [], + { + "kind": { + "StorageDead": 7 + } + } + ], "terminator": { - "kind": "Return", - "span": 36 + "kind": "Return" } } ], "locals": [ { - "mutability": "Mut", - "span": 37 + "mutability": "Mut" + }, + { + "mutability": "Not" + }, + { + "mutability": "Not" + }, + { + "mutability": "Not" + }, + { + "mutability": "Not" + }, + { + "mutability": "Mut" }, { - "mutability": "Not", - "span": 38 + "mutability": "Not" }, { - "mutability": "Not", - "span": 39 + "mutability": "Not" } ], - "span": 42, "spread_arg": null, "var_debug_info": [ { "argument_index": 1, "composite": null, - "name": "f", + "name": "main", "source_info": { - "scope": 0, - "span": 38 + "scope": 0 }, "value": { "Place": { @@ -567,136 +593,53 @@ } }, { - "argument_index": null, + "argument_index": 2, "composite": null, - "name": "result", + "name": "argc", "source_info": { - "scope": 1, - "span": 40 + "scope": 0 }, "value": { "Place": { - "local": 0, + "local": 2, "projection": [] } } }, { - "argument_index": 1, + "argument_index": 3, "composite": null, - "name": "dummy", + "name": "argv", "source_info": { - "scope": 2, - "span": 41 + "scope": 0 }, "value": { - "Const": { - "const_": { - "id": 4, - "kind": "ZeroSized" - }, - "span": 32, - "user_ty": null + "Place": { + "local": 3, + "projection": [] + } + } + }, + { + "argument_index": 4, + "composite": null, + "name": "sigpipe", + "source_info": { + "scope": 0 + }, + "value": { + "Place": { + "local": 4, + "projection": [] } } } ] }, - "id": 2, - "name": "std::sys::backtrace::__rust_begin_short_backtrace::" + "name": "std::rt::lang_start::<()>" } }, - "symbol_name": "_ZN3std3sys9backtrace28__rust_begin_short_backtrace17h" - }, - { - "details": null, - "mono_item_kind": { - "MonoItemFn": { - "body": { - "arg_count": 1, - "blocks": [ - { - "statements": [ - { - "kind": { - "Assign": [ - { - "local": 0, - "projection": [] - }, - { - "Use": { - "Constant": { - "const_": { - "id": 8, - "kind": { - "Allocated": { - "align": 1, - "bytes": [ - 0 - ], - "mutability": "Mut", - "provenance": { - "ptrs": [] - } - } - } - }, - "span": 46, - "user_ty": null - } - } - } - ] - }, - "span": 46 - } - ], - "terminator": { - "kind": "Return", - "span": 45 - } - } - ], - "locals": [ - { - "mutability": "Mut", - "span": 47 - }, - { - "mutability": "Not", - "span": 48 - } - ], - "span": 49, - "spread_arg": null, - "var_debug_info": [ - { - "argument_index": 1, - "composite": null, - "name": "self", - "source_info": { - "scope": 0, - "span": 48 - }, - "value": { - "Const": { - "const_": { - "id": 4, - "kind": "ZeroSized" - }, - "span": 32, - "user_ty": null - } - } - } - ] - }, - "id": 5, - "name": "<() as std::process::Termination>::report" - } - }, - "symbol_name": "_ZN54_$LT$$LP$$RP$$u20$as$u20$std..process..Termination$GT$6report17h" + "symbol_name": "_ZN3std2rt10lang_start17h" }, { "details": null, @@ -710,20 +653,17 @@ { "kind": { "StorageLive": 2 - }, - "span": 16 + } }, { "kind": { "StorageLive": 3 - }, - "span": 15 + } }, { "kind": { "StorageLive": 4 - }, - "span": 17 + } }, { "kind": { @@ -741,7 +681,7 @@ { "Field": [ 0, - 7 + 0 ] } ] @@ -749,8 +689,7 @@ } } ] - }, - "span": 17 + } } ], "terminator": { @@ -771,18 +710,15 @@ "func": { "Constant": { "const_": { - "id": 1, "kind": "ZeroSized" }, - "span": 14, "user_ty": null } }, "target": 1, "unwind": "Continue" } - }, - "span": 15 + } } }, { @@ -790,8 +726,7 @@ { "kind": { "StorageDead": 4 - }, - "span": 19 + } } ], "terminator": { @@ -812,18 +747,15 @@ "func": { "Constant": { "const_": { - "id": 2, "kind": "ZeroSized" }, - "span": 18, "user_ty": null } }, "target": 2, "unwind": "Continue" } - }, - "span": 16 + } } }, { @@ -831,14 +763,12 @@ { "kind": { "StorageDead": 3 - }, - "span": 21 + } }, { "kind": { "StorageLive": 5 - }, - "span": 22 + } }, { "kind": { @@ -847,42 +777,6 @@ "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": { @@ -891,13 +785,13 @@ { "Field": [ 0, - 15 + 0 ] }, { "Field": [ 0, - 9 + 0 ] } ] @@ -905,8 +799,7 @@ } } ] - }, - "span": 23 + } }, { "kind": { @@ -920,73 +813,52 @@ "IntToInt", { "Move": { - "local": 6, + "local": 5, "projection": [] } }, - 16 + 0 ] } ] - }, - "span": 24 - }, - { - "kind": { - "StorageDead": 6 - }, - "span": 25 + } }, { "kind": { "StorageDead": 5 - }, - "span": 26 + } }, { "kind": { "StorageDead": 2 - }, - "span": 27 + } } ], "terminator": { - "kind": "Return", - "span": 20 + "kind": "Return" } } ], "locals": [ { - "mutability": "Mut", - "span": 28 - }, - { - "mutability": "Mut", - "span": 3 + "mutability": "Mut" }, { - "mutability": "Mut", - "span": 16 + "mutability": "Mut" }, { - "mutability": "Mut", - "span": 15 + "mutability": "Mut" }, { - "mutability": "Mut", - "span": 17 + "mutability": "Mut" }, { - "mutability": "Mut", - "span": 22 + "mutability": "Mut" }, { - "mutability": "Mut", - "span": 23 + "mutability": "Mut" } ], - "span": 3, "spread_arg": null, "var_debug_info": [ { @@ -994,8 +866,7 @@ "composite": null, "name": "main", "source_info": { - "scope": 0, - "span": 9 + "scope": 0 }, "value": { "Place": { @@ -1005,7 +876,7 @@ { "Field": [ 0, - 7 + 0 ] } ] @@ -1017,8 +888,7 @@ "composite": null, "name": "self", "source_info": { - "scope": 1, - "span": 29 + "scope": 1 }, "value": { "Place": { @@ -1026,25 +896,9 @@ "projection": [] } } - }, - { - "argument_index": 1, - "composite": null, - "name": "self", - "source_info": { - "scope": 2, - "span": 30 - }, - "value": { - "Place": { - "local": 5, - "projection": [] - } - } } ] }, - "id": 1, "name": "std::rt::lang_start::<()>::{closure#0}" } }, @@ -1055,62 +909,150 @@ "mono_item_kind": { "MonoItemFn": { "body": { - "arg_count": 2, + "arg_count": 1, "blocks": [ { "statements": [], "terminator": { "kind": { "Call": { - "args": [], + "args": [ + { + "Move": { + "local": 1, + "projection": [] + } + }, + { + "Constant": { + "const_": { + "kind": "ZeroSized" + }, + "user_ty": null + } + } + ], "destination": { "local": 0, "projection": [] }, "func": { - "Move": { - "local": 1, - "projection": [] + "Constant": { + "const_": { + "kind": "ZeroSized" + }, + "user_ty": null } }, "target": 1, "unwind": "Continue" } - }, - "span": 43 + } + } + }, + { + "statements": [], + "terminator": { + "kind": { + "Call": { + "args": [ + { + "Constant": { + "const_": { + "kind": "ZeroSized" + }, + "user_ty": null + } + } + ], + "destination": { + "local": 2, + "projection": [] + }, + "func": { + "Constant": { + "const_": { + "kind": "ZeroSized" + }, + "user_ty": null + } + }, + "target": 2, + "unwind": "Unreachable" + } + } } }, { "statements": [], "terminator": { - "kind": "Return", - "span": 43 + "kind": "Return" } } ], "locals": [ { - "mutability": "Mut", - "span": 43 + "mutability": "Mut" }, { - "mutability": "Not", - "span": 43 + "mutability": "Not" }, { - "mutability": "Not", - "span": 43 + "mutability": "Not" } ], - "span": 43, - "spread_arg": 2, - "var_debug_info": [] + "spread_arg": null, + "var_debug_info": [ + { + "argument_index": 1, + "composite": null, + "name": "f", + "source_info": { + "scope": 0 + }, + "value": { + "Place": { + "local": 1, + "projection": [] + } + } + }, + { + "argument_index": null, + "composite": null, + "name": "result", + "source_info": { + "scope": 1 + }, + "value": { + "Place": { + "local": 0, + "projection": [] + } + } + }, + { + "argument_index": 1, + "composite": null, + "name": "dummy", + "source_info": { + "scope": 2 + }, + "value": { + "Const": { + "const_": { + "kind": "ZeroSized" + }, + "user_ty": null + } + } + } + ] }, - "id": 3, - "name": ">::call_once" + "name": "std::sys::backtrace::__rust_begin_short_backtrace::" } }, - "symbol_name": "_ZN4core3ops8function6FnOnce9call_once17h" + "symbol_name": "_ZN3std3sys9backtrace28__rust_begin_short_backtrace17h" }, { "details": null, @@ -1147,52 +1089,98 @@ "func": { "Constant": { "const_": { - "id": 6, "kind": "ZeroSized" }, - "span": 43, "user_ty": null } }, "target": 1, "unwind": "Continue" } - }, - "span": 43 + } } }, { "statements": [], "terminator": { - "kind": "Return", - "span": 43 + "kind": "Return" } } ], "locals": [ { - "mutability": "Mut", - "span": 43 + "mutability": "Mut" }, { - "mutability": "Not", - "span": 43 + "mutability": "Not" }, { - "mutability": "Not", - "span": 43 + "mutability": "Not" } ], - "span": 43, "spread_arg": 2, "var_debug_info": [] }, - "id": 3, "name": "<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once" } }, "symbol_name": "_ZN4core3ops8function6FnOnce40call_once$u7b$$u7b$vtable.shim$u7d$$u7d$17h" }, + { + "details": null, + "mono_item_kind": { + "MonoItemFn": { + "body": { + "arg_count": 2, + "blocks": [ + { + "statements": [], + "terminator": { + "kind": { + "Call": { + "args": [], + "destination": { + "local": 0, + "projection": [] + }, + "func": { + "Move": { + "local": 1, + "projection": [] + } + }, + "target": 1, + "unwind": "Continue" + } + } + } + }, + { + "statements": [], + "terminator": { + "kind": "Return" + } + } + ], + "locals": [ + { + "mutability": "Mut" + }, + { + "mutability": "Not" + }, + { + "mutability": "Not" + } + ], + "spread_arg": 2, + "var_debug_info": [] + }, + "name": ">::call_once" + } + }, + "symbol_name": "_ZN4core3ops8function6FnOnce9call_once17h" + }, { "details": null, "mono_item_kind": { @@ -1226,8 +1214,7 @@ ] } ] - }, - "span": 43 + } } ], "terminator": { @@ -1254,10 +1241,8 @@ "func": { "Constant": { "const_": { - "id": 7, "kind": "ZeroSized" }, - "span": 43, "user_ty": null } }, @@ -1266,8 +1251,7 @@ "Cleanup": 3 } } - }, - "span": 43 + } } }, { @@ -1282,15 +1266,13 @@ "target": 2, "unwind": "Continue" } - }, - "span": 43 + } } }, { "statements": [], "terminator": { - "kind": "Return", - "span": 43 + "kind": "Return" } }, { @@ -1305,222 +1287,77 @@ "target": 4, "unwind": "Terminate" } - }, - "span": 43 - } - }, - { - "statements": [], - "terminator": { - "kind": "Resume", - "span": 43 - } - } - ], - "locals": [ - { - "mutability": "Mut", - "span": 43 - }, - { - "mutability": "Not", - "span": 43 - }, - { - "mutability": "Not", - "span": 43 - }, - { - "mutability": "Not", - "span": 43 - } - ], - "span": 43, - "spread_arg": 2, - "var_debug_info": [] - }, - "id": 3, - "name": "<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once" - } - }, - "symbol_name": "_ZN4core3ops8function6FnOnce9call_once17h" - }, - { - "details": null, - "mono_item_kind": { - "MonoItemFn": { - "body": { - "arg_count": 4, - "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": { - "args": [ - { - "Move": { - "local": 6, - "projection": [] - } - }, - { - "Move": { - "local": 2, - "projection": [] - } - }, - { - "Move": { - "local": 3, - "projection": [] - } - }, - { - "Move": { - "local": 4, - "projection": [] - } - } - ], - "destination": { - "local": 5, - "projection": [] - }, - "func": { - "Constant": { - "const_": { - "id": 0, - "kind": "ZeroSized" - }, - "span": 0, - "user_ty": null - } - }, - "target": 1, - "unwind": "Continue" - } - }, - "span": 1 } }, + { + "statements": [], + "terminator": { + "kind": "Resume" + } + } + ], + "locals": [ + { + "mutability": "Mut" + }, + { + "mutability": "Not" + }, + { + "mutability": "Not" + }, + { + "mutability": "Not" + } + ], + "spread_arg": 2, + "var_debug_info": [] + }, + "name": "<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once" + } + }, + "symbol_name": "_ZN4core3ops8function6FnOnce9call_once17h" + }, + { + "details": null, + "mono_item_kind": { + "MonoItemFn": { + "body": { + "arg_count": 1, + "blocks": [ + { + "statements": [], + "terminator": { + "kind": "Return" + } + } + ], + "locals": [ + { + "mutability": "Mut" + }, + { + "mutability": "Not" + } + ], + "spread_arg": null, + "var_debug_info": [] + }, + "name": "std::ptr::drop_in_place::<{closure@std::rt::lang_start<()>::{closure#0}}>" + } + }, + "symbol_name": "_ZN4core3ptr85drop_in_place$LT$std..rt..lang_start$LT$$LP$$RP$$GT$..$u7b$$u7b$closure$u7d$$u7d$$GT$17h" + }, + { + "details": null, + "mono_item_kind": { + "MonoItemFn": { + "body": { + "arg_count": 1, + "blocks": [ { "statements": [ - { - "kind": { - "StorageDead": 6 - }, - "span": 5 - }, { "kind": { "Assign": [ @@ -1530,168 +1367,49 @@ }, { "Use": { - "Copy": { - "local": 5, - "projection": [ - { - "Downcast": 0 - }, - { - "Field": [ - 0, - 6 - ] + "Constant": { + "const_": { + "kind": { + "Allocated": { + "align": 1, + "bytes": [ + 0 + ], + "mutability": "Mut", + "provenance": { + "ptrs": [] + } + } } - ] + }, + "user_ty": null } } } ] - }, - "span": 6 - }, - { - "kind": { - "StorageDead": 8 - }, - "span": 7 - }, - { - "kind": { - "StorageDead": 5 - }, - "span": 7 + } } ], "terminator": { - "kind": "Return", - "span": 4 + "kind": "Return" } } ], "locals": [ { - "mutability": "Mut", - "span": 8 - }, - { - "mutability": "Not", - "span": 9 - }, - { - "mutability": "Not", - "span": 10 - }, - { - "mutability": "Not", - "span": 11 - }, - { - "mutability": "Not", - "span": 12 - }, - { - "mutability": "Mut", - "span": 1 - }, - { - "mutability": "Mut", - "span": 2 - }, - { - "mutability": "Not", - "span": 2 + "mutability": "Mut" }, { - "mutability": "Not", - "span": 3 + "mutability": "Not" } ], - "span": 13, "spread_arg": null, - "var_debug_info": [ - { - "argument_index": 1, - "composite": null, - "name": "main", - "source_info": { - "scope": 0, - "span": 9 - }, - "value": { - "Place": { - "local": 1, - "projection": [] - } - } - }, - { - "argument_index": 2, - "composite": null, - "name": "argc", - "source_info": { - "scope": 0, - "span": 10 - }, - "value": { - "Place": { - "local": 2, - "projection": [] - } - } - }, - { - "argument_index": 3, - "composite": null, - "name": "argv", - "source_info": { - "scope": 0, - "span": 11 - }, - "value": { - "Place": { - "local": 3, - "projection": [] - } - } - }, - { - "argument_index": 4, - "composite": null, - "name": "sigpipe", - "source_info": { - "scope": 0, - "span": 12 - }, - "value": { - "Place": { - "local": 4, - "projection": [] - } - } - }, - { - "argument_index": null, - "composite": null, - "name": "v", - "source_info": { - "scope": 1, - "span": 6 - }, - "value": { - "Place": { - "local": 0, - "projection": [] - } - } - } - ] + "var_debug_info": [] }, - "id": 0, - "name": "std::rt::lang_start::<()>" + "name": "<() as std::process::Termination>::report" } }, - "symbol_name": "_ZN3std2rt10lang_start17h" + "symbol_name": "_ZN54_$LT$$LP$$RP$$u20$as$u20$std..process..Termination$GT$6report17h" } ], "types": [ @@ -1733,54 +1451,6 @@ } } ], - [ - { - "EnumType": { - "discriminants": [ - 0, - 1 - ], - "fields": "elided", - "layout": { - "abi": { - "Scalar": { - "Initialized": { - "valid_range": { - "end": 18446744073709551615, - "start": 0 - }, - "value": { - "Int": { - "length": "I64", - "signed": true - } - } - } - } - }, - "abi_align": 8, - "fields": { - "Arbitrary": { - "offsets": [ - { - "num_bits": 0 - } - ] - } - }, - "size": { - "num_bits": 64 - }, - "variants": { - "Single": { - "index": 0 - } - } - }, - "name": "std::result::Result" - } - } - ], [ { "StructType": { @@ -2196,39 +1866,6 @@ } } ], - [ - { - "RefType": { - "layout": { - "abi": { - "Scalar": { - "Initialized": { - "valid_range": { - "end": 18446744073709551615, - "start": 1 - }, - "value": { - "Pointer": 0 - } - } - } - }, - "abi_align": 8, - "fields": "Primitive", - "size": { - "num_bits": 64 - }, - "variants": { - "Single": { - "index": 0 - } - } - }, - "mutability": "Not", - "pointee_type": "elided" - } - } - ], [ { "RefType": { diff --git a/tests/integration/programs/weirdRefs.smir.json.expected b/tests/integration/expected/nightly-2025-03-01/weirdRefs.smir.json.expected similarity index 83% rename from tests/integration/programs/weirdRefs.smir.json.expected rename to tests/integration/expected/nightly-2025-03-01/weirdRefs.smir.json.expected index fe11aec6..db861743 100644 --- a/tests/integration/programs/weirdRefs.smir.json.expected +++ b/tests/integration/expected/nightly-2025-03-01/weirdRefs.smir.json.expected @@ -271,111 +271,66 @@ "mono_item_kind": { "MonoItemFn": { "body": { - "arg_count": 0, + "arg_count": 4, "blocks": [ { "statements": [ + { + "kind": { + "StorageLive": 5 + } + }, + { + "kind": { + "StorageLive": 7 + } + }, { "kind": { "Assign": [ { - "local": 1, + "local": 7, "projection": [] }, { "Aggregate": [ { - "Adt": [ - 7, + "Closure": [ 0, - [], - null, - null + [ + { + "Type": 0 + }, + { + "Type": 0 + }, + { + "Type": 0 + }, + { + "Type": 0 + } + ] ] }, [ { - "Constant": { - "const_": { - "id": 9, - "kind": { - "Allocated": { - "align": 1, - "bytes": [ - 32 - ], - "mutability": "Mut", - "provenance": { - "ptrs": [] - } - } - } - }, - "span": 51, - "user_ty": null - } - }, - { - "Constant": { - "const_": { - "id": 10, - "kind": { - "Allocated": { - "align": 1, - "bytes": [ - 0 - ], - "mutability": "Mut", - "provenance": { - "ptrs": [] - } - } - } - }, - "span": 52, - "user_ty": null - } - }, - { - "Constant": { - "const_": { - "id": 11, - "kind": { - "Allocated": { - "align": 8, - "bytes": [ - 32, - 0, - 0, - 0, - 0, - 0, - 0, - 0 - ], - "mutability": "Mut", - "provenance": { - "ptrs": [] - } - } - } - }, - "span": 53, - "user_ty": null + "Copy": { + "local": 1, + "projection": [] } } ] ] } ] - }, - "span": 54 + } }, { "kind": { "Assign": [ { - "local": 2, + "local": 6, "projection": [] }, { @@ -383,237 +338,226 @@ { "kind": "ReErased" }, + "Shared", { - "Mut": { - "kind": "Default" - } - }, - { - "local": 1, - "projection": [ - { - "Field": [ - 0, - 2 - ] - } - ] + "local": 7, + "projection": [] } ] } ] - }, - "span": 55 - }, - { - "kind": { - "Assign": [ - { - "local": 2, - "projection": [ - "Deref" - ] - }, - { - "Use": { - "Constant": { - "const_": { - "id": 12, - "kind": { - "Allocated": { - "align": 1, - "bytes": [ - 42 - ], - "mutability": "Mut", - "provenance": { - "ptrs": [] - } - } - } - }, - "span": 56, - "user_ty": null - } - } - } - ] - }, - "span": 57 + } }, { "kind": { "Assign": [ { - "local": 3, + "local": 5, "projection": [] }, { - "Use": { - "Copy": { - "local": 1, - "projection": [ - { - "Field": [ - 0, - 2 - ] - } - ] - } - } + "Cast": [ + { + "PointerCoercion": "Unsize" + }, + { + "Copy": { + "local": 6, + "projection": [] + } + }, + 0 + ] } ] - }, - "span": 58 + } } ], "terminator": { "kind": { - "SwitchInt": { - "discr": { - "Move": { - "local": 3, - "projection": [] + "Call": { + "args": [ + { + "Move": { + "local": 5, + "projection": [] + } + }, + { + "Move": { + "local": 2, + "projection": [] + } + }, + { + "Move": { + "local": 3, + "projection": [] + } + }, + { + "Move": { + "local": 4, + "projection": [] + } } + ], + "destination": { + "local": 0, + "projection": [] }, - "targets": { - "branches": [ - [ - 42, - 1 - ] - ], - "otherwise": 2 - } + "func": { + "Constant": { + "const_": { + "kind": "ZeroSized" + }, + "user_ty": null + } + }, + "target": 1, + "unwind": "Continue" } - }, - "span": 50 + } } }, { "statements": [ { "kind": { - "Assign": [ - { - "local": 5, - "projection": [] - }, - { - "Ref": [ - { - "kind": "ReErased" - }, - { - "Mut": { - "kind": "Default" - } - }, - { - "local": 1, - "projection": [ - { - "Field": [ - 0, - 2 - ] - } - ] - } - ] - } - ] - }, - "span": 60 + "StorageDead": 5 + } }, { "kind": { - "Assign": [ - { - "local": 6, - "projection": [] - }, - { - "Ref": [ - { - "kind": "ReErased" - }, - { - "Mut": { - "kind": "Default" - } - }, - { - "local": 5, - "projection": [] - } - ] - } - ] - }, - "span": 61 + "StorageDead": 7 + } + } + ], + "terminator": { + "kind": "Return" + } + } + ], + "locals": [ + { + "mutability": "Mut" + }, + { + "mutability": "Not" + }, + { + "mutability": "Not" + }, + { + "mutability": "Not" + }, + { + "mutability": "Not" + }, + { + "mutability": "Mut" + }, + { + "mutability": "Not" + }, + { + "mutability": "Not" + } + ], + "spread_arg": null, + "var_debug_info": [ + { + "argument_index": 1, + "composite": null, + "name": "main", + "source_info": { + "scope": 0 + }, + "value": { + "Place": { + "local": 1, + "projection": [] + } + } + }, + { + "argument_index": 2, + "composite": null, + "name": "argc", + "source_info": { + "scope": 0 + }, + "value": { + "Place": { + "local": 2, + "projection": [] + } + } + }, + { + "argument_index": 3, + "composite": null, + "name": "argv", + "source_info": { + "scope": 0 + }, + "value": { + "Place": { + "local": 3, + "projection": [] + } + } + }, + { + "argument_index": 4, + "composite": null, + "name": "sigpipe", + "source_info": { + "scope": 0 + }, + "value": { + "Place": { + "local": 4, + "projection": [] + } + } + } + ] + }, + "name": "std::rt::lang_start::<()>" + } + }, + "symbol_name": "_ZN3std2rt10lang_start17h" + }, + { + "details": null, + "mono_item_kind": { + "MonoItemFn": { + "body": { + "arg_count": 1, + "blocks": [ + { + "statements": [ + { + "kind": { + "StorageLive": 2 + } }, { "kind": { - "Assign": [ - { - "local": 20, - "projection": [] - }, - { - "CopyForDeref": { - "local": 6, - "projection": [ - "Deref" - ] - } - } - ] - }, - "span": 62 + "StorageLive": 3 + } }, { "kind": { - "Assign": [ - { - "local": 20, - "projection": [ - "Deref" - ] - }, - { - "Use": { - "Constant": { - "const_": { - "id": 13, - "kind": { - "Allocated": { - "align": 1, - "bytes": [ - 43 - ], - "mutability": "Mut", - "provenance": { - "ptrs": [] - } - } - } - }, - "span": 63, - "user_ty": null - } - } - } - ] - }, - "span": 62 + "StorageLive": 4 + } }, { "kind": { "Assign": [ { - "local": 7, + "local": 4, "projection": [] }, { @@ -621,10 +565,11 @@ "Copy": { "local": 1, "projection": [ + "Deref", { "Field": [ 0, - 2 + 0 ] } ] @@ -632,1329 +577,1037 @@ } } ] - }, - "span": 64 + } } ], - "terminator": { - "kind": { - "SwitchInt": { - "discr": { - "Move": { - "local": 7, - "projection": [] - } - }, - "targets": { - "branches": [ - [ - 43, - 3 - ] - ], - "otherwise": 4 - } - } - }, - "span": 59 - } - }, - { - "statements": [], "terminator": { "kind": { "Call": { "args": [ { - "Constant": { - "const_": { - "id": 15, - "kind": { - "Allocated": { - "align": 8, - "bytes": [ - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 33, - 0, - 0, - 0, - 0, - 0, - 0, - 0 - ], - "mutability": "Mut", - "provenance": { - "ptrs": [ - [ - 0, - 0 - ] - ] - } - } - } - }, - "span": 32, - "user_ty": null + "Move": { + "local": 4, + "projection": [] } } ], "destination": { - "local": 4, + "local": 3, "projection": [] }, "func": { "Constant": { "const_": { - "id": 14, "kind": "ZeroSized" }, - "span": 65, "user_ty": null } }, - "target": null, + "target": 1, "unwind": "Continue" } - }, - "span": 65 + } } }, { "statements": [ { "kind": { - "Assign": [ - { - "local": 10, - "projection": [] - }, - { - "Ref": [ - { - "kind": "ReErased" - }, - { - "Mut": { - "kind": "Default" - } - }, - { - "local": 1, - "projection": [] - } - ] + "StorageDead": 4 + } + } + ], + "terminator": { + "kind": { + "Call": { + "args": [ + { + "Move": { + "local": 3, + "projection": [] + } } - ] - }, - "span": 67 + ], + "destination": { + "local": 2, + "projection": [] + }, + "func": { + "Constant": { + "const_": { + "kind": "ZeroSized" + }, + "user_ty": null + } + }, + "target": 2, + "unwind": "Continue" + } + } + } + }, + { + "statements": [ + { + "kind": { + "StorageDead": 3 + } + }, + { + "kind": { + "StorageLive": 5 + } }, { "kind": { "Assign": [ { - "local": 9, + "local": 5, "projection": [] }, { - "Aggregate": [ - { - "Adt": [ - 8, - 0, - [ - { - "Lifetime": { - "kind": "ReErased" - } - } - ], - null, - null - ] - }, - [ - { - "Copy": { - "local": 10, - "projection": [] + "Use": { + "Copy": { + "local": 2, + "projection": [ + { + "Field": [ + 0, + 0 + ] + }, + { + "Field": [ + 0, + 0 + ] } - } - ] - ] + ] + } + } } ] - }, - "span": 68 + } }, { "kind": { "Assign": [ { - "local": 11, + "local": 0, "projection": [] }, { - "Ref": [ - { - "kind": "ReErased" - }, + "Cast": [ + "IntToInt", { - "Mut": { - "kind": "Default" + "Move": { + "local": 5, + "projection": [] } }, - { - "local": 9, - "projection": [] - } + 0 ] } ] - }, - "span": 69 + } }, { "kind": { - "Assign": [ - { - "local": 21, - "projection": [] - }, - { - "CopyForDeref": { - "local": 11, - "projection": [ - "Deref", - { - "Field": [ - 0, - 29 - ] - } - ] - } - } - ] - }, - "span": 70 + "StorageDead": 5 + } }, { "kind": { - "Assign": [ - { - "local": 12, - "projection": [] - }, - { - "Use": { - "Copy": { - "local": 21, - "projection": [ - "Deref", - { - "Field": [ - 0, - 2 - ] - } - ] - } - } - } - ] - }, - "span": 70 + "StorageDead": 2 + } } ], "terminator": { - "kind": { - "SwitchInt": { - "discr": { - "Copy": { - "local": 12, - "projection": [] - } - }, - "targets": { - "branches": [ - [ - 43, - 5 - ] - ], - "otherwise": 6 + "kind": "Return" + } + } + ], + "locals": [ + { + "mutability": "Mut" + }, + { + "mutability": "Mut" + }, + { + "mutability": "Mut" + }, + { + "mutability": "Mut" + }, + { + "mutability": "Mut" + }, + { + "mutability": "Mut" + } + ], + "spread_arg": null, + "var_debug_info": [ + { + "argument_index": null, + "composite": null, + "name": "main", + "source_info": { + "scope": 0 + }, + "value": { + "Place": { + "local": 1, + "projection": [ + "Deref", + { + "Field": [ + 0, + 0 + ] } - } - }, - "span": 66 + ] + } } }, + { + "argument_index": 1, + "composite": null, + "name": "self", + "source_info": { + "scope": 1 + }, + "value": { + "Place": { + "local": 2, + "projection": [] + } + } + } + ] + }, + "name": "std::rt::lang_start::<()>::{closure#0}" + } + }, + "symbol_name": "_ZN3std2rt10lang_start28_$u7b$$u7b$closure$u7d$$u7d$17h" + }, + { + "details": null, + "mono_item_kind": { + "MonoItemFn": { + "body": { + "arg_count": 1, + "blocks": [ { "statements": [], "terminator": { "kind": { "Call": { "args": [ + { + "Move": { + "local": 1, + "projection": [] + } + }, { "Constant": { "const_": { - "id": 16, - "kind": { - "Allocated": { - "align": 8, - "bytes": [ - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 33, - 0, - 0, - 0, - 0, - 0, - 0, - 0 - ], - "mutability": "Mut", - "provenance": { - "ptrs": [ - [ - 0, - 1 - ] - ] - } - } - } + "kind": "ZeroSized" }, - "span": 32, "user_ty": null } } ], "destination": { - "local": 8, + "local": 0, "projection": [] }, "func": { "Constant": { "const_": { - "id": 14, "kind": "ZeroSized" }, - "span": 71, "user_ty": null } }, - "target": null, + "target": 1, "unwind": "Continue" } - }, - "span": 71 + } } }, { - "statements": [ - { - "kind": { - "Assign": [ - { - "local": 22, - "projection": [] - }, + "statements": [], + "terminator": { + "kind": { + "Call": { + "args": [ { - "CopyForDeref": { - "local": 11, - "projection": [ - "Deref", - { - "Field": [ - 0, - 29 - ] - } - ] + "Constant": { + "const_": { + "kind": "ZeroSized" + }, + "user_ty": null } } - ] - }, - "span": 73 - }, - { - "kind": { - "Assign": [ - { - "local": 22, - "projection": [ - "Deref", - { - "Field": [ - 1, - 25 - ] - } - ] - }, - { - "Use": { - "Constant": { - "const_": { - "id": 17, - "kind": { - "Allocated": { - "align": 1, - "bytes": [ - 1 - ], - "mutability": "Mut", - "provenance": { - "ptrs": [] - } - } - } - }, - "span": 74, - "user_ty": null - } - } + ], + "destination": { + "local": 2, + "projection": [] + }, + "func": { + "Constant": { + "const_": { + "kind": "ZeroSized" + }, + "user_ty": null } - ] + }, + "target": 2, + "unwind": "Unreachable" + } + } + } + }, + { + "statements": [], + "terminator": { + "kind": "Return" + } + } + ], + "locals": [ + { + "mutability": "Mut" + }, + { + "mutability": "Not" + }, + { + "mutability": "Not" + } + ], + "spread_arg": null, + "var_debug_info": [ + { + "argument_index": 1, + "composite": null, + "name": "f", + "source_info": { + "scope": 0 + }, + "value": { + "Place": { + "local": 1, + "projection": [] + } + } + }, + { + "argument_index": null, + "composite": null, + "name": "result", + "source_info": { + "scope": 1 + }, + "value": { + "Place": { + "local": 0, + "projection": [] + } + } + }, + { + "argument_index": 1, + "composite": null, + "name": "dummy", + "source_info": { + "scope": 2 + }, + "value": { + "Const": { + "const_": { + "kind": "ZeroSized" }, - "span": 73 - }, - { - "kind": { - "Assign": [ - { - "local": 23, - "projection": [] - }, + "user_ty": null + } + } + } + ] + }, + "name": "std::sys::backtrace::__rust_begin_short_backtrace::" + } + }, + "symbol_name": "_ZN3std3sys9backtrace28__rust_begin_short_backtrace17h" + }, + { + "details": null, + "mono_item_kind": { + "MonoItemFn": { + "body": { + "arg_count": 2, + "blocks": [ + { + "statements": [], + "terminator": { + "kind": { + "Call": { + "args": [ { - "CopyForDeref": { - "local": 11, + "Move": { + "local": 1, "projection": [ - "Deref", - { - "Field": [ - 0, - 29 - ] - } + "Deref" ] } - } - ] - }, - "span": 75 - }, - { - "kind": { - "Assign": [ - { - "local": 14, - "projection": [] }, { - "Ref": [ - { - "kind": "ReErased" - }, - { - "Mut": { - "kind": "Default" - } - }, - { - "local": 23, - "projection": [ - "Deref", - { - "Field": [ - 2, - 26 - ] - } - ] - } - ] + "Move": { + "local": 2, + "projection": [] + } } - ] - }, - "span": 75 - }, - { - "kind": { - "Assign": [ - { - "local": 24, - "projection": [] - }, - { - "CopyForDeref": { - "local": 11, - "projection": [ - "Deref", - { - "Field": [ - 0, - 29 - ] - } - ] - } + ], + "destination": { + "local": 0, + "projection": [] + }, + "func": { + "Constant": { + "const_": { + "kind": "ZeroSized" + }, + "user_ty": null } - ] - }, - "span": 76 - }, - { - "kind": { - "Assign": [ - { - "local": 15, + }, + "target": 1, + "unwind": "Continue" + } + } + } + }, + { + "statements": [], + "terminator": { + "kind": "Return" + } + } + ], + "locals": [ + { + "mutability": "Mut" + }, + { + "mutability": "Not" + }, + { + "mutability": "Not" + } + ], + "spread_arg": 2, + "var_debug_info": [] + }, + "name": "<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once" + } + }, + "symbol_name": "_ZN4core3ops8function6FnOnce40call_once$u7b$$u7b$vtable.shim$u7d$$u7d$17h" + }, + { + "details": null, + "mono_item_kind": { + "MonoItemFn": { + "body": { + "arg_count": 2, + "blocks": [ + { + "statements": [], + "terminator": { + "kind": { + "Call": { + "args": [], + "destination": { + "local": 0, + "projection": [] + }, + "func": { + "Move": { + "local": 1, "projection": [] - }, - { - "Use": { - "Copy": { - "local": 24, - "projection": [ - "Deref", - { - "Field": [ - 0, - 2 - ] - } - ] - } - } } - ] - }, - "span": 76 - }, + }, + "target": 1, + "unwind": "Continue" + } + } + } + }, + { + "statements": [], + "terminator": { + "kind": "Return" + } + } + ], + "locals": [ + { + "mutability": "Mut" + }, + { + "mutability": "Not" + }, + { + "mutability": "Not" + } + ], + "spread_arg": 2, + "var_debug_info": [] + }, + "name": ">::call_once" + } + }, + "symbol_name": "_ZN4core3ops8function6FnOnce9call_once17h" + }, + { + "details": null, + "mono_item_kind": { + "MonoItemFn": { + "body": { + "arg_count": 2, + "blocks": [ + { + "statements": [ { "kind": { "Assign": [ { - "local": 14, - "projection": [ - "Deref" - ] + "local": 3, + "projection": [] }, { - "Cast": [ - "IntToInt", + "Ref": [ { - "Move": { - "local": 15, - "projection": [] + "kind": "ReErased" + }, + { + "Mut": { + "kind": "Default" } }, - 26 - ] - } - ] - }, - "span": 77 - }, - { - "kind": { - "Assign": [ - { - "local": 16, - "projection": [] - }, - { - "Use": { - "Copy": { + { "local": 1, - "projection": [ - { - "Field": [ - 1, - 25 - ] - } - ] + "projection": [] } - } + ] } ] - }, - "span": 72 + } } ], - "terminator": { - "kind": { - "SwitchInt": { - "discr": { - "Move": { - "local": 16, - "projection": [] - } - }, - "targets": { - "branches": [ - [ - 0, - 8 - ] - ], - "otherwise": 7 - } - } - }, - "span": 72 - } - }, - { - "statements": [], "terminator": { "kind": { "Call": { "args": [ { - "Constant": { - "const_": { - "id": 18, - "kind": { - "Allocated": { - "align": 8, - "bytes": [ - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 26, - 0, - 0, - 0, - 0, - 0, - 0, - 0 - ], - "mutability": "Mut", - "provenance": { - "ptrs": [ - [ - 0, - 2 - ] - ] - } - } - } - }, - "span": 32, - "user_ty": null + "Move": { + "local": 3, + "projection": [] + } + }, + { + "Move": { + "local": 2, + "projection": [] } } ], "destination": { - "local": 13, + "local": 0, "projection": [] }, "func": { "Constant": { "const_": { - "id": 14, "kind": "ZeroSized" }, - "span": 78, "user_ty": null } }, - "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 + "target": 1, + "unwind": { + "Cleanup": 3 } } - }, - "span": 79 + } } }, { "statements": [], "terminator": { "kind": { - "Call": { - "args": [ - { - "Constant": { - "const_": { - "id": 19, - "kind": { - "Allocated": { - "align": 8, - "bytes": [ - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 27, - 0, - 0, - 0, - 0, - 0, - 0, - 0 - ], - "mutability": "Mut", - "provenance": { - "ptrs": [ - [ - 0, - 3 - ] - ] - } - } - } - }, - "span": 32, - "user_ty": null - } - } - ], - "destination": { - "local": 17, + "Drop": { + "place": { + "local": 1, "projection": [] }, - "func": { - "Constant": { - "const_": { - "id": 14, - "kind": "ZeroSized" - }, - "span": 81, - "user_ty": null - } - }, - "target": null, + "target": 2, "unwind": "Continue" } - }, - "span": 81 + } } }, { "statements": [], "terminator": { - "kind": "Return", - "span": 82 + "kind": "Return" } }, { "statements": [], "terminator": { "kind": { - "Call": { - "args": [ - { - "Constant": { - "const_": { - "id": 20, - "kind": { - "Allocated": { - "align": 8, - "bytes": [ - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 33, - 0, - 0, - 0, - 0, - 0, - 0, - 0 - ], - "mutability": "Mut", - "provenance": { - "ptrs": [ - [ - 0, - 4 - ] - ] - } - } - } - }, - "span": 32, - "user_ty": null - } - } - ], - "destination": { - "local": 19, + "Drop": { + "place": { + "local": 1, "projection": [] }, - "func": { - "Constant": { - "const_": { - "id": 14, - "kind": "ZeroSized" - }, - "span": 83, - "user_ty": null - } - }, - "target": null, - "unwind": "Continue" + "target": 4, + "unwind": "Terminate" } - }, - "span": 83 + } + } + }, + { + "statements": [], + "terminator": { + "kind": "Resume" } } ], "locals": [ { - "mutability": "Mut", - "span": 84 - }, - { - "mutability": "Mut", - "span": 85 - }, - { - "mutability": "Not", - "span": 86 - }, - { - "mutability": "Mut", - "span": 58 - }, - { - "mutability": "Mut", - "span": 65 - }, - { - "mutability": "Mut", - "span": 87 - }, - { - "mutability": "Not", - "span": 88 + "mutability": "Mut" }, { - "mutability": "Mut", - "span": 64 + "mutability": "Not" }, { - "mutability": "Mut", - "span": 71 + "mutability": "Not" }, { - "mutability": "Mut", - "span": 89 - }, - { - "mutability": "Mut", - "span": 67 - }, - { - "mutability": "Not", - "span": 90 - }, - { - "mutability": "Not", - "span": 91 - }, - { - "mutability": "Mut", - "span": 78 - }, - { - "mutability": "Not", - "span": 92 - }, - { - "mutability": "Mut", - "span": 76 - }, - { - "mutability": "Mut", - "span": 72 - }, - { - "mutability": "Mut", - "span": 81 - }, - { - "mutability": "Mut", - "span": 80 - }, - { - "mutability": "Mut", - "span": 83 - }, - { - "mutability": "Mut", - "span": 88 - }, - { - "mutability": "Mut", - "span": 90 - }, + "mutability": "Not" + } + ], + "spread_arg": 2, + "var_debug_info": [] + }, + "name": "<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once" + } + }, + "symbol_name": "_ZN4core3ops8function6FnOnce9call_once17h" + }, + { + "details": null, + "mono_item_kind": { + "MonoItemFn": { + "body": { + "arg_count": 1, + "blocks": [ { - "mutability": "Mut", - "span": 90 - }, + "statements": [], + "terminator": { + "kind": "Return" + } + } + ], + "locals": [ { - "mutability": "Mut", - "span": 90 + "mutability": "Mut" }, { - "mutability": "Mut", - "span": 90 + "mutability": "Not" } ], - "span": 93, "spread_arg": null, - "var_debug_info": [ + "var_debug_info": [] + }, + "name": "std::ptr::drop_in_place::<{closure@std::rt::lang_start<()>::{closure#0}}>" + } + }, + "symbol_name": "_ZN4core3ptr85drop_in_place$LT$std..rt..lang_start$LT$$LP$$RP$$GT$..$u7b$$u7b$closure$u7d$$u7d$$GT$17h" + }, + { + "details": null, + "mono_item_kind": { + "MonoItemFn": { + "body": { + "arg_count": 1, + "blocks": [ { - "argument_index": null, - "composite": null, - "name": "a", - "source_info": { - "scope": 1, - "span": 85 - }, - "value": { - "Place": { - "local": 1, - "projection": [] - } - } - }, - { - "argument_index": null, - "composite": null, - "name": "r1", - "source_info": { - "scope": 2, - "span": 86 - }, - "value": { - "Place": { - "local": 2, - "projection": [] - } - } - }, - { - "argument_index": null, - "composite": null, - "name": "r1", - "source_info": { - "scope": 3, - "span": 87 - }, - "value": { - "Place": { - "local": 5, - "projection": [] - } - } - }, - { - "argument_index": null, - "composite": null, - "name": "r2", - "source_info": { - "scope": 4, - "span": 88 - }, - "value": { - "Place": { - "local": 6, - "projection": [] - } - } - }, - { - "argument_index": null, - "composite": null, - "name": "e", - "source_info": { - "scope": 5, - "span": 89 - }, - "value": { - "Place": { - "local": 9, - "projection": [] - } - } - }, - { - "argument_index": null, - "composite": null, - "name": "ee", - "source_info": { - "scope": 6, - "span": 90 - }, - "value": { - "Place": { - "local": 11, - "projection": [] - } - } - }, - { - "argument_index": null, - "composite": null, - "name": "vv", - "source_info": { - "scope": 7, - "span": 91 - }, - "value": { - "Place": { - "local": 12, - "projection": [] - } - } - }, - { - "argument_index": null, - "composite": null, - "name": "r3", - "source_info": { - "scope": 8, - "span": 92 - }, - "value": { - "Place": { - "local": 14, - "projection": [] + "statements": [ + { + "kind": { + "Assign": [ + { + "local": 0, + "projection": [] + }, + { + "Use": { + "Constant": { + "const_": { + "kind": { + "Allocated": { + "align": 1, + "bytes": [ + 0 + ], + "mutability": "Mut", + "provenance": { + "ptrs": [] + } + } + } + }, + "user_ty": null + } + } + } + ] + } } - } - } - ] - }, - "id": 6, - "name": "main" - } - }, - "symbol_name": "_ZN9weirdRefs4main17h" - }, - { - "details": null, - "mono_item_kind": { - "MonoItemFn": { - "body": { - "arg_count": 1, - "blocks": [ - { - "statements": [], + ], "terminator": { - "kind": "Return", - "span": 44 + "kind": "Return" } } ], "locals": [ { - "mutability": "Mut", - "span": 44 + "mutability": "Mut" }, { - "mutability": "Not", - "span": 44 + "mutability": "Not" } ], - "span": 44, "spread_arg": null, "var_debug_info": [] }, - "id": 4, - "name": "std::ptr::drop_in_place::<{closure@std::rt::lang_start<()>::{closure#0}}>" + "name": "<() as std::process::Termination>::report" } }, - "symbol_name": "_ZN4core3ptr85drop_in_place$LT$std..rt..lang_start$LT$$LP$$RP$$GT$..$u7b$$u7b$closure$u7d$$u7d$$GT$17h" + "symbol_name": "_ZN54_$LT$$LP$$RP$$u20$as$u20$std..process..Termination$GT$6report17h" }, { "details": null, "mono_item_kind": { "MonoItemFn": { "body": { - "arg_count": 1, + "arg_count": 0, "blocks": [ { - "statements": [], - "terminator": { - "kind": { - "Call": { - "args": [ + "statements": [ + { + "kind": { + "Assign": [ { - "Move": { - "local": 1, - "projection": [] - } + "local": 1, + "projection": [] }, { - "Constant": { - "const_": { - "id": 4, - "kind": "ZeroSized" + "Aggregate": [ + { + "Adt": [ + 0, + 0, + [], + null, + null + ] }, - "span": 32, - "user_ty": null - } + [ + { + "Constant": { + "const_": { + "kind": { + "Allocated": { + "align": 1, + "bytes": [ + 32 + ], + "mutability": "Mut", + "provenance": { + "ptrs": [] + } + } + } + }, + "user_ty": null + } + }, + { + "Constant": { + "const_": { + "kind": { + "Allocated": { + "align": 1, + "bytes": [ + 0 + ], + "mutability": "Mut", + "provenance": { + "ptrs": [] + } + } + } + }, + "user_ty": null + } + }, + { + "Constant": { + "const_": { + "kind": { + "Allocated": { + "align": 8, + "bytes": [ + 32, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "mutability": "Mut", + "provenance": { + "ptrs": [] + } + } + } + }, + "user_ty": null + } + } + ] + ] } - ], - "destination": { - "local": 0, - "projection": [] - }, - "func": { - "Constant": { - "const_": { - "id": 3, - "kind": "ZeroSized" - }, - "span": 31, - "user_ty": null - } - }, - "target": 1, - "unwind": "Continue" + ] } }, - "span": 33 - } - }, - { - "statements": [], - "terminator": { - "kind": { - "Call": { - "args": [ + { + "kind": { + "Assign": [ { - "Constant": { - "const_": { - "id": 4, - "kind": "ZeroSized" + "local": 2, + "projection": [] + }, + { + "Ref": [ + { + "kind": "ReErased" }, - "span": 32, - "user_ty": null - } + { + "Mut": { + "kind": "Default" + } + }, + { + "local": 1, + "projection": [ + { + "Field": [ + 0, + 0 + ] + } + ] + } + ] } - ], - "destination": { - "local": 2, - "projection": [] - }, - "func": { - "Constant": { - "const_": { - "id": 5, - "kind": "ZeroSized" - }, - "span": 34, - "user_ty": null + ] + } + }, + { + "kind": { + "Assign": [ + { + "local": 2, + "projection": [ + "Deref" + ] + }, + { + "Use": { + "Constant": { + "const_": { + "kind": { + "Allocated": { + "align": 1, + "bytes": [ + 42 + ], + "mutability": "Mut", + "provenance": { + "ptrs": [] + } + } + } + }, + "user_ty": null + } + } } - }, - "target": 2, - "unwind": "Unreachable" + ] } }, - "span": 35 - } - }, - { - "statements": [], - "terminator": { - "kind": "Return", - "span": 36 - } - } - ], - "locals": [ - { - "mutability": "Mut", - "span": 37 - }, - { - "mutability": "Not", - "span": 38 - }, - { - "mutability": "Not", - "span": 39 - } - ], - "span": 42, - "spread_arg": null, - "var_debug_info": [ - { - "argument_index": 1, - "composite": null, - "name": "f", - "source_info": { - "scope": 0, - "span": 38 - }, - "value": { - "Place": { - "local": 1, - "projection": [] + { + "kind": { + "Assign": [ + { + "local": 3, + "projection": [] + }, + { + "Use": { + "Copy": { + "local": 1, + "projection": [ + { + "Field": [ + 0, + 0 + ] + } + ] + } + } + } + ] + } } - } - }, - { - "argument_index": null, - "composite": null, - "name": "result", - "source_info": { - "scope": 1, - "span": 40 - }, - "value": { - "Place": { - "local": 0, - "projection": [] + ], + "terminator": { + "kind": { + "SwitchInt": { + "discr": { + "Move": { + "local": 3, + "projection": [] + } + }, + "targets": { + "branches": [ + [ + 42, + 1 + ] + ], + "otherwise": 2 + } + } } } }, - { - "argument_index": 1, - "composite": null, - "name": "dummy", - "source_info": { - "scope": 2, - "span": 41 - }, - "value": { - "Const": { - "const_": { - "id": 4, - "kind": "ZeroSized" - }, - "span": 32, - "user_ty": null - } - } - } - ] - }, - "id": 2, - "name": "std::sys::backtrace::__rust_begin_short_backtrace::" - } - }, - "symbol_name": "_ZN3std3sys9backtrace28__rust_begin_short_backtrace17h" - }, - { - "details": null, - "mono_item_kind": { - "MonoItemFn": { - "body": { - "arg_count": 1, - "blocks": [ { "statements": [ { "kind": { "Assign": [ { - "local": 0, + "local": 5, + "projection": [] + }, + { + "Ref": [ + { + "kind": "ReErased" + }, + { + "Mut": { + "kind": "Default" + } + }, + { + "local": 1, + "projection": [ + { + "Field": [ + 0, + 0 + ] + } + ] + } + ] + } + ] + } + }, + { + "kind": { + "Assign": [ + { + "local": 6, "projection": [] }, + { + "Ref": [ + { + "kind": "ReErased" + }, + { + "Mut": { + "kind": "Default" + } + }, + { + "local": 5, + "projection": [] + } + ] + } + ] + } + }, + { + "kind": { + "Assign": [ + { + "local": 20, + "projection": [] + }, + { + "CopyForDeref": { + "local": 6, + "projection": [ + "Deref" + ] + } + } + ] + } + }, + { + "kind": { + "Assign": [ + { + "local": 20, + "projection": [ + "Deref" + ] + }, { "Use": { "Constant": { "const_": { - "id": 8, "kind": { "Allocated": { "align": 1, "bytes": [ - 0 + 43 ], "mutability": "Mut", "provenance": { @@ -1963,106 +1616,257 @@ } } }, - "span": 46, "user_ty": null } } } ] - }, - "span": 46 + } + }, + { + "kind": { + "Assign": [ + { + "local": 7, + "projection": [] + }, + { + "Use": { + "Copy": { + "local": 1, + "projection": [ + { + "Field": [ + 0, + 0 + ] + } + ] + } + } + } + ] + } } ], "terminator": { - "kind": "Return", - "span": 45 + "kind": { + "SwitchInt": { + "discr": { + "Move": { + "local": 7, + "projection": [] + } + }, + "targets": { + "branches": [ + [ + 43, + 3 + ] + ], + "otherwise": 4 + } + } + } } - } - ], - "locals": [ - { - "mutability": "Mut", - "span": 47 }, { - "mutability": "Not", - "span": 48 - } - ], - "span": 49, - "spread_arg": null, - "var_debug_info": [ - { - "argument_index": 1, - "composite": null, - "name": "self", - "source_info": { - "scope": 0, - "span": 48 - }, - "value": { - "Const": { - "const_": { - "id": 4, - "kind": "ZeroSized" - }, - "span": 32, - "user_ty": null + "statements": [], + "terminator": { + "kind": { + "Call": { + "args": [ + { + "Constant": { + "const_": { + "kind": { + "Allocated": { + "align": 8, + "bytes": [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 33, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "mutability": "Mut", + "provenance": { + "ptrs": [ + [ + 0, + 0 + ] + ] + } + } + } + }, + "user_ty": null + } + } + ], + "destination": { + "local": 4, + "projection": [] + }, + "func": { + "Constant": { + "const_": { + "kind": "ZeroSized" + }, + "user_ty": null + } + }, + "target": null, + "unwind": "Continue" + } } } - } - ] - }, - "id": 5, - "name": "<() as std::process::Termination>::report" - } - }, - "symbol_name": "_ZN54_$LT$$LP$$RP$$u20$as$u20$std..process..Termination$GT$6report17h" - }, - { - "details": null, - "mono_item_kind": { - "MonoItemFn": { - "body": { - "arg_count": 1, - "blocks": [ + }, { "statements": [ { "kind": { - "StorageLive": 2 - }, - "span": 16 + "Assign": [ + { + "local": 10, + "projection": [] + }, + { + "Ref": [ + { + "kind": "ReErased" + }, + { + "Mut": { + "kind": "Default" + } + }, + { + "local": 1, + "projection": [] + } + ] + } + ] + } }, { "kind": { - "StorageLive": 3 - }, - "span": 15 + "Assign": [ + { + "local": 9, + "projection": [] + }, + { + "Aggregate": [ + { + "Adt": [ + 0, + 0, + [ + { + "Lifetime": { + "kind": "ReErased" + } + } + ], + null, + null + ] + }, + [ + { + "Copy": { + "local": 10, + "projection": [] + } + } + ] + ] + } + ] + } }, { "kind": { - "StorageLive": 4 - }, - "span": 17 + "Assign": [ + { + "local": 11, + "projection": [] + }, + { + "Ref": [ + { + "kind": "ReErased" + }, + { + "Mut": { + "kind": "Default" + } + }, + { + "local": 9, + "projection": [] + } + ] + } + ] + } }, { "kind": { "Assign": [ { - "local": 4, + "local": 21, + "projection": [] + }, + { + "CopyForDeref": { + "local": 11, + "projection": [ + "Deref", + { + "Field": [ + 0, + 0 + ] + } + ] + } + } + ] + } + }, + { + "kind": { + "Assign": [ + { + "local": 12, "projection": [] }, { "Use": { "Copy": { - "local": 1, + "local": 21, "projection": [ "Deref", { "Field": [ 0, - 7 + 0 ] } ] @@ -2070,102 +1874,189 @@ } } ] - }, - "span": 17 + } } ], "terminator": { "kind": { - "Call": { - "args": [ - { - "Move": { - "local": 4, - "projection": [] - } - } - ], - "destination": { - "local": 3, - "projection": [] - }, - "func": { - "Constant": { - "const_": { - "id": 1, - "kind": "ZeroSized" - }, - "span": 14, - "user_ty": null + "SwitchInt": { + "discr": { + "Copy": { + "local": 12, + "projection": [] } }, - "target": 1, - "unwind": "Continue" + "targets": { + "branches": [ + [ + 43, + 5 + ] + ], + "otherwise": 6 + } } - }, - "span": 15 + } } }, { - "statements": [ - { - "kind": { - "StorageDead": 4 - }, - "span": 19 - } - ], + "statements": [], "terminator": { "kind": { "Call": { "args": [ { - "Move": { - "local": 3, - "projection": [] + "Constant": { + "const_": { + "kind": { + "Allocated": { + "align": 8, + "bytes": [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 33, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "mutability": "Mut", + "provenance": { + "ptrs": [ + [ + 0, + 1 + ] + ] + } + } + } + }, + "user_ty": null } } ], "destination": { - "local": 2, + "local": 8, "projection": [] }, "func": { "Constant": { "const_": { - "id": 2, "kind": "ZeroSized" }, - "span": 18, "user_ty": null } }, - "target": 2, + "target": null, "unwind": "Continue" } - }, - "span": 16 + } } }, { "statements": [ { "kind": { - "StorageDead": 3 - }, - "span": 21 + "Assign": [ + { + "local": 22, + "projection": [] + }, + { + "CopyForDeref": { + "local": 11, + "projection": [ + "Deref", + { + "Field": [ + 0, + 0 + ] + } + ] + } + } + ] + } }, { "kind": { - "StorageLive": 5 - }, - "span": 22 + "Assign": [ + { + "local": 22, + "projection": [ + "Deref", + { + "Field": [ + 1, + 0 + ] + } + ] + }, + { + "Use": { + "Constant": { + "const_": { + "kind": { + "Allocated": { + "align": 1, + "bytes": [ + 1 + ], + "mutability": "Mut", + "provenance": { + "ptrs": [] + } + } + } + }, + "user_ty": null + } + } + } + ] + } }, { "kind": { "Assign": [ { - "local": 5, + "local": 23, + "projection": [] + }, + { + "CopyForDeref": { + "local": 11, + "projection": [ + "Deref", + { + "Field": [ + 0, + 0 + ] + } + ] + } + } + ] + } + }, + { + "kind": { + "Assign": [ + { + "local": 14, "projection": [] }, { @@ -2173,14 +2064,19 @@ { "kind": "ReErased" }, - "Shared", { - "local": 2, + "Mut": { + "kind": "Default" + } + }, + { + "local": 23, "projection": [ + "Deref", { "Field": [ - 0, - 15 + 2, + 0 ] } ] @@ -2188,37 +2084,49 @@ ] } ] - }, - "span": 22 + } }, { "kind": { - "StorageLive": 6 - }, - "span": 23 + "Assign": [ + { + "local": 24, + "projection": [] + }, + { + "CopyForDeref": { + "local": 11, + "projection": [ + "Deref", + { + "Field": [ + 0, + 0 + ] + } + ] + } + } + ] + } }, { "kind": { "Assign": [ { - "local": 6, + "local": 15, "projection": [] }, { "Use": { "Copy": { - "local": 2, + "local": 24, "projection": [ + "Deref", { "Field": [ 0, - 15 - ] - }, - { - "Field": [ - 0, - 9 + 0 ] } ] @@ -2226,220 +2134,80 @@ } } ] - }, - "span": 23 + } }, { "kind": { "Assign": [ { - "local": 0, - "projection": [] + "local": 14, + "projection": [ + "Deref" + ] }, { "Cast": [ "IntToInt", { "Move": { - "local": 6, + "local": 15, "projection": [] } }, - 16 + 0 ] } ] - }, - "span": 24 - }, - { - "kind": { - "StorageDead": 6 - }, - "span": 25 - }, - { - "kind": { - "StorageDead": 5 - }, - "span": 26 + } }, { "kind": { - "StorageDead": 2 - }, - "span": 27 + "Assign": [ + { + "local": 16, + "projection": [] + }, + { + "Use": { + "Copy": { + "local": 1, + "projection": [ + { + "Field": [ + 1, + 0 + ] + } + ] + } + } + } + ] + } } ], - "terminator": { - "kind": "Return", - "span": 20 - } - } - ], - "locals": [ - { - "mutability": "Mut", - "span": 28 - }, - { - "mutability": "Mut", - "span": 3 - }, - { - "mutability": "Mut", - "span": 16 - }, - { - "mutability": "Mut", - "span": 15 - }, - { - "mutability": "Mut", - "span": 17 - }, - { - "mutability": "Mut", - "span": 22 - }, - { - "mutability": "Mut", - "span": 23 - } - ], - "span": 3, - "spread_arg": null, - "var_debug_info": [ - { - "argument_index": null, - "composite": null, - "name": "main", - "source_info": { - "scope": 0, - "span": 9 - }, - "value": { - "Place": { - "local": 1, - "projection": [ - "Deref", - { - "Field": [ - 0, - 7 - ] - } - ] - } - } - }, - { - "argument_index": 1, - "composite": null, - "name": "self", - "source_info": { - "scope": 1, - "span": 29 - }, - "value": { - "Place": { - "local": 2, - "projection": [] - } - } - }, - { - "argument_index": 1, - "composite": null, - "name": "self", - "source_info": { - "scope": 2, - "span": 30 - }, - "value": { - "Place": { - "local": 5, - "projection": [] - } - } - } - ] - }, - "id": 1, - "name": "std::rt::lang_start::<()>::{closure#0}" - } - }, - "symbol_name": "_ZN3std2rt10lang_start28_$u7b$$u7b$closure$u7d$$u7d$17h" - }, - { - "details": null, - "mono_item_kind": { - "MonoItemFn": { - "body": { - "arg_count": 2, - "blocks": [ - { - "statements": [], "terminator": { "kind": { - "Call": { - "args": [], - "destination": { - "local": 0, - "projection": [] - }, - "func": { + "SwitchInt": { + "discr": { "Move": { - "local": 1, + "local": 16, "projection": [] } }, - "target": 1, - "unwind": "Continue" + "targets": { + "branches": [ + [ + 0, + 8 + ] + ], + "otherwise": 7 + } } - }, - "span": 43 - } - }, - { - "statements": [], - "terminator": { - "kind": "Return", - "span": 43 + } } - } - ], - "locals": [ - { - "mutability": "Mut", - "span": 43 - }, - { - "mutability": "Not", - "span": 43 }, - { - "mutability": "Not", - "span": 43 - } - ], - "span": 43, - "spread_arg": 2, - "var_debug_info": [] - }, - "id": 3, - "name": ">::call_once" - } - }, - "symbol_name": "_ZN4core3ops8function6FnOnce9call_once17h" - }, - { - "details": null, - "mono_item_kind": { - "MonoItemFn": { - "body": { - "arg_count": 2, - "blocks": [ { "statements": [], "terminator": { @@ -2447,497 +2215,333 @@ "Call": { "args": [ { - "Move": { - "local": 1, - "projection": [ - "Deref" - ] - } - }, - { - "Move": { - "local": 2, - "projection": [] + "Constant": { + "const_": { + "kind": { + "Allocated": { + "align": 8, + "bytes": [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 26, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "mutability": "Mut", + "provenance": { + "ptrs": [ + [ + 0, + 2 + ] + ] + } + } + } + }, + "user_ty": null } } ], "destination": { - "local": 0, + "local": 13, "projection": [] }, "func": { "Constant": { "const_": { - "id": 6, "kind": "ZeroSized" }, - "span": 43, "user_ty": null } }, - "target": 1, + "target": null, "unwind": "Continue" } - }, - "span": 43 - } - }, - { - "statements": [], - "terminator": { - "kind": "Return", - "span": 43 + } } - } - ], - "locals": [ - { - "mutability": "Mut", - "span": 43 }, - { - "mutability": "Not", - "span": 43 - }, - { - "mutability": "Not", - "span": 43 - } - ], - "span": 43, - "spread_arg": 2, - "var_debug_info": [] - }, - "id": 3, - "name": "<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once" - } - }, - "symbol_name": "_ZN4core3ops8function6FnOnce40call_once$u7b$$u7b$vtable.shim$u7d$$u7d$17h" - }, - { - "details": null, - "mono_item_kind": { - "MonoItemFn": { - "body": { - "arg_count": 2, - "blocks": [ { "statements": [ { "kind": { "Assign": [ { - "local": 3, + "local": 18, "projection": [] }, { - "Ref": [ - { - "kind": "ReErased" - }, - { - "Mut": { - "kind": "Default" - } - }, - { + "Use": { + "Copy": { "local": 1, - "projection": [] + "projection": [ + { + "Field": [ + 2, + 0 + ] + } + ] } - ] + } } ] - }, - "span": 43 + } } ], + "terminator": { + "kind": { + "SwitchInt": { + "discr": { + "Move": { + "local": 18, + "projection": [] + } + }, + "targets": { + "branches": [ + [ + 43, + 9 + ] + ], + "otherwise": 10 + } + } + } + } + }, + { + "statements": [], "terminator": { "kind": { "Call": { "args": [ { - "Move": { - "local": 3, - "projection": [] - } - }, - { - "Move": { - "local": 2, - "projection": [] + "Constant": { + "const_": { + "kind": { + "Allocated": { + "align": 8, + "bytes": [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 27, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "mutability": "Mut", + "provenance": { + "ptrs": [ + [ + 0, + 3 + ] + ] + } + } + } + }, + "user_ty": null } } ], "destination": { - "local": 0, + "local": 17, "projection": [] }, "func": { "Constant": { "const_": { - "id": 7, "kind": "ZeroSized" }, - "span": 43, "user_ty": null } }, - "target": 1, - "unwind": { - "Cleanup": 3 - } - } - }, - "span": 43 - } - }, - { - "statements": [], - "terminator": { - "kind": { - "Drop": { - "place": { - "local": 1, - "projection": [] - }, - "target": 2, + "target": null, "unwind": "Continue" } - }, - "span": 43 + } } }, { "statements": [], "terminator": { - "kind": "Return", - "span": 43 + "kind": "Return" } }, { "statements": [], "terminator": { "kind": { - "Drop": { - "place": { - "local": 1, - "projection": [] - }, - "target": 4, - "unwind": "Terminate" - } - }, - "span": 43 - } - }, - { - "statements": [], - "terminator": { - "kind": "Resume", - "span": 43 - } - } - ], - "locals": [ - { - "mutability": "Mut", - "span": 43 - }, - { - "mutability": "Not", - "span": 43 - }, - { - "mutability": "Not", - "span": 43 - }, - { - "mutability": "Not", - "span": 43 - } - ], - "span": 43, - "spread_arg": 2, - "var_debug_info": [] - }, - "id": 3, - "name": "<{closure@std::rt::lang_start<()>::{closure#0}} as std::ops::FnOnce<()>>::call_once" - } - }, - "symbol_name": "_ZN4core3ops8function6FnOnce9call_once17h" - }, - { - "details": null, - "mono_item_kind": { - "MonoItemFn": { - "body": { - "arg_count": 4, - "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": [] - }, + "Call": { + "args": [ { - "Cast": [ - { - "PointerCoercion": "Unsize" - }, - { - "Copy": { - "local": 7, - "projection": [] + "Constant": { + "const_": { + "kind": { + "Allocated": { + "align": 8, + "bytes": [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 33, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "mutability": "Mut", + "provenance": { + "ptrs": [ + [ + 0, + 4 + ] + ] + } + } } }, - 5 - ] - } - ] - }, - "span": 2 - } - ], - "terminator": { - "kind": { - "Call": { - "args": [ - { - "Move": { - "local": 6, - "projection": [] - } - }, - { - "Move": { - "local": 2, - "projection": [] - } - }, - { - "Move": { - "local": 3, - "projection": [] - } - }, - { - "Move": { - "local": 4, - "projection": [] + "user_ty": null } } ], "destination": { - "local": 5, + "local": 19, "projection": [] }, "func": { "Constant": { "const_": { - "id": 0, "kind": "ZeroSized" }, - "span": 0, "user_ty": null } }, - "target": 1, + "target": null, "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": [ { - "mutability": "Mut", - "span": 8 + "mutability": "Mut" + }, + { + "mutability": "Mut" + }, + { + "mutability": "Not" + }, + { + "mutability": "Mut" + }, + { + "mutability": "Mut" + }, + { + "mutability": "Mut" + }, + { + "mutability": "Not" }, { - "mutability": "Not", - "span": 9 + "mutability": "Mut" }, { - "mutability": "Not", - "span": 10 + "mutability": "Mut" }, { - "mutability": "Not", - "span": 11 + "mutability": "Mut" }, { - "mutability": "Not", - "span": 12 + "mutability": "Mut" }, { - "mutability": "Mut", - "span": 1 + "mutability": "Not" }, { - "mutability": "Mut", - "span": 2 + "mutability": "Not" }, { - "mutability": "Not", - "span": 2 + "mutability": "Mut" }, { - "mutability": "Not", - "span": 3 + "mutability": "Not" + }, + { + "mutability": "Mut" + }, + { + "mutability": "Mut" + }, + { + "mutability": "Mut" + }, + { + "mutability": "Mut" + }, + { + "mutability": "Mut" + }, + { + "mutability": "Mut" + }, + { + "mutability": "Mut" + }, + { + "mutability": "Mut" + }, + { + "mutability": "Mut" + }, + { + "mutability": "Mut" } ], - "span": 13, "spread_arg": null, "var_debug_info": [ { - "argument_index": 1, + "argument_index": null, "composite": null, - "name": "main", + "name": "a", "source_info": { - "scope": 0, - "span": 9 + "scope": 1 }, "value": { "Place": { @@ -2947,12 +2551,11 @@ } }, { - "argument_index": 2, + "argument_index": null, "composite": null, - "name": "argc", + "name": "r1", "source_info": { - "scope": 0, - "span": 10 + "scope": 2 }, "value": { "Place": { @@ -2962,31 +2565,29 @@ } }, { - "argument_index": 3, + "argument_index": null, "composite": null, - "name": "argv", + "name": "r1", "source_info": { - "scope": 0, - "span": 11 + "scope": 3 }, "value": { "Place": { - "local": 3, + "local": 5, "projection": [] } } }, { - "argument_index": 4, + "argument_index": null, "composite": null, - "name": "sigpipe", + "name": "r2", "source_info": { - "scope": 0, - "span": 12 + "scope": 4 }, "value": { "Place": { - "local": 4, + "local": 6, "projection": [] } } @@ -2994,25 +2595,65 @@ { "argument_index": null, "composite": null, - "name": "v", + "name": "e", "source_info": { - "scope": 1, - "span": 6 + "scope": 5 }, "value": { "Place": { - "local": 0, + "local": 9, + "projection": [] + } + } + }, + { + "argument_index": null, + "composite": null, + "name": "ee", + "source_info": { + "scope": 6 + }, + "value": { + "Place": { + "local": 11, + "projection": [] + } + } + }, + { + "argument_index": null, + "composite": null, + "name": "vv", + "source_info": { + "scope": 7 + }, + "value": { + "Place": { + "local": 12, + "projection": [] + } + } + }, + { + "argument_index": null, + "composite": null, + "name": "r3", + "source_info": { + "scope": 8 + }, + "value": { + "Place": { + "local": 14, "projection": [] } } } ] }, - "id": 0, - "name": "std::rt::lang_start::<()>" + "name": "main" } }, - "symbol_name": "_ZN3std2rt10lang_start17h" + "symbol_name": "_ZN9weirdRefs4main17h" } ], "types": [ @@ -3068,54 +2709,6 @@ } } ], - [ - { - "EnumType": { - "discriminants": [ - 0, - 1 - ], - "fields": "elided", - "layout": { - "abi": { - "Scalar": { - "Initialized": { - "valid_range": { - "end": 18446744073709551615, - "start": 0 - }, - "value": { - "Int": { - "length": "I64", - "signed": true - } - } - } - } - }, - "abi_align": 8, - "fields": { - "Arbitrary": { - "offsets": [ - { - "num_bits": 0 - } - ] - } - }, - "size": { - "num_bits": 64 - }, - "variants": { - "Single": { - "index": 0 - } - } - }, - "name": "std::result::Result" - } - } - ], [ { "StructType": { @@ -3714,39 +3307,6 @@ } } ], - [ - { - "RefType": { - "layout": { - "abi": { - "Scalar": { - "Initialized": { - "valid_range": { - "end": 18446744073709551615, - "start": 1 - }, - "value": { - "Pointer": 0 - } - } - } - }, - "abi_align": 8, - "fields": "Primitive", - "size": { - "num_bits": 64 - }, - "variants": { - "Single": { - "index": 0 - } - } - }, - "mutability": "Not", - "pointee_type": "elided" - } - } - ], [ { "RefType": {