Skip to content

Commit

Permalink
add 2 ices
Browse files Browse the repository at this point in the history
  • Loading branch information
matthiaskrgr committed Jul 15, 2022
1 parent b92e688 commit 1828c76
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 0 deletions.
7 changes: 7 additions & 0 deletions ices/99073.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
fn main() {
let _ = fix(|_: &dyn Fn()| {});
}

fn fix<F: Fn(G), G: Fn()>(f: F) -> impl Fn() {
move || f(fix(&f))
}
16 changes: 16 additions & 0 deletions ices/99228.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#!/bin/bash

rustc -Zvalidate-mir - <<'EOF'
#![feature(let_else)]
fn example_let_else(value: Option<String>) {
let _inner = value else {
return;
};
}
fn main() {
example_let_else(None);
}
EOF

0 comments on commit 1828c76

Please sign in to comment.