From 1828c76ef7295911cbf63d2f7178d86ca7685ec7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matthias=20Kr=C3=BCger?= Date: Fri, 15 Jul 2022 13:16:44 +0200 Subject: [PATCH] add 2 ices https://github.com/rust-lang/rust/issues/99073 https://github.com/rust-lang/rust/issues/99228 --- ices/99073.rs | 7 +++++++ ices/99228.sh | 16 ++++++++++++++++ 2 files changed, 23 insertions(+) create mode 100644 ices/99073.rs create mode 100755 ices/99228.sh diff --git a/ices/99073.rs b/ices/99073.rs new file mode 100644 index 00000000..b0241137 --- /dev/null +++ b/ices/99073.rs @@ -0,0 +1,7 @@ +fn main() { + let _ = fix(|_: &dyn Fn()| {}); +} + +fn fix(f: F) -> impl Fn() { + move || f(fix(&f)) +} diff --git a/ices/99228.sh b/ices/99228.sh new file mode 100755 index 00000000..3c0c8e7a --- /dev/null +++ b/ices/99228.sh @@ -0,0 +1,16 @@ +#!/bin/bash + +rustc -Zvalidate-mir - <<'EOF' + +#![feature(let_else)] +fn example_let_else(value: Option) { + let _inner = value else { + return; + }; +} +fn main() { + example_let_else(None); +} + +EOF +