diff --git a/crates/compiler/mono/src/ir.rs b/crates/compiler/mono/src/ir.rs index ad533f3b7e..d9c179aa4f 100644 --- a/crates/compiler/mono/src/ir.rs +++ b/crates/compiler/mono/src/ir.rs @@ -2358,15 +2358,11 @@ impl<'a> Stmt<'a> { pub fn is_terminal(&self) -> bool { use Stmt::*; - match self { - Switch { .. } => { - // TODO is this the reason Lean only looks at the outermost `when`? - true - } - Ret(_) => true, - Jump(_, _) => true, - _ => false, - } + matches!( + self, + Switch { .. } | Ret(_) | Jump(_, _) + // TODO for Switch; is this the reason Lean only looks at the outermost `when`? + ) } pub fn if_then_else( diff --git a/flake.lock b/flake.lock index 693a2dfd14..9090478afd 100644 --- a/flake.lock +++ b/flake.lock @@ -2,11 +2,11 @@ "nodes": { "flake-utils": { "locked": { - "lastModified": 1659877975, - "narHash": "sha256-zllb8aq3YO3h8B/U0/J1WBgAL8EX5yWf5pMj3G0NAmc=", + "lastModified": 1667395993, + "narHash": "sha256-nuEHfE/LcWyuSWnS8t12N1wc105Qtau+/OdUAjtQ0rA=", "owner": "numtide", "repo": "flake-utils", - "rev": "c0e246b9b83f637f4681389ecabcb2681b4f3af0", + "rev": "5aed5285a952e0b949eb3ba02c12fa4fcfef535f", "type": "github" }, "original": { @@ -30,18 +30,34 @@ "type": "github" } }, + "flake-utils_3": { + "locked": { + "lastModified": 1659877975, + "narHash": "sha256-zllb8aq3YO3h8B/U0/J1WBgAL8EX5yWf5pMj3G0NAmc=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "c0e246b9b83f637f4681389ecabcb2681b4f3af0", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, "nixgl": { "inputs": { + "flake-utils": "flake-utils_2", "nixpkgs": [ "nixpkgs" ] }, "locked": { - "lastModified": 1654775507, - "narHash": "sha256-NPkQiaz6Oo5EuWj5hRXMKebAhAfiVtnklii0imR85dE=", + "lastModified": 1661367362, + "narHash": "sha256-Qc8MXcV+YCPREu8kk6oggk23ZBKLqeQRAIsLbHEviPE=", "owner": "guibou", "repo": "nixGL", - "rev": "1cce2dd704829504d057dacc71daf1c00951460d", + "rev": "7165ffbccbd2cf4379b6cd6d2edd1620a427e5ae", "type": "github" }, "original": { @@ -52,11 +68,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1661088761, - "narHash": "sha256-5DGKX81wIPAAiLwUmUYECpA3vop94AHHR7WmGXSsQok=", + "lastModified": 1667901915, + "narHash": "sha256-IkSou5ox/yZ2YUhGpk8vxd2TNU2pwRlYtir5k55NaxE=", "owner": "nixos", "repo": "nixpkgs", - "rev": "a7855f2235a1876f97473a76151fec2afa02b287", + "rev": "093268502280540a7f5bf1e2a6330a598ba3b7d0", "type": "github" }, "original": { @@ -76,17 +92,17 @@ }, "rust-overlay": { "inputs": { - "flake-utils": "flake-utils_2", + "flake-utils": "flake-utils_3", "nixpkgs": [ "nixpkgs" ] }, "locked": { - "lastModified": 1661136859, - "narHash": "sha256-o3y1elFGRs/9kqaIeziAnTy9lIWA6VHtQfq0ARRVO2A=", + "lastModified": 1667962118, + "narHash": "sha256-RJi/HxlFxxJr1VeM3LLwrrRhiDGza+gphDMzt9QUS+M=", "owner": "oxalica", "repo": "rust-overlay", - "rev": "6d1418192be90968acfa25e7d7b089e246eb15c4", + "rev": "91af035847a74cbd49ce9f764f8ef5fc641cb9b0", "type": "github" }, "original": { diff --git a/rust-toolchain.toml b/rust-toolchain.toml index 4f9d6a0259..1924978fb6 100644 --- a/rust-toolchain.toml +++ b/rust-toolchain.toml @@ -1,6 +1,7 @@ [toolchain] -channel = "1.63.0" -# channel = "nightly-2022-04-03" # nightly to be able to use unstable features +channel = "1.64.0" # when changing this, update the date below with the last nightly with matching version using the link below +# https://github.com/oxalica/rust-overlay/tree/master/manifests/nightly/2022 +# channel = "nightly-2022-08-06" # 1.64 nightly to be able to use unstable features profile = "default" components = [ # for usages of rust-analyzer or similar tools inside `nix develop`