diff options
Diffstat (limited to 'tests/ui/mir/issue66339.rs')
-rw-r--r-- | tests/ui/mir/issue66339.rs | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/ui/mir/issue66339.rs b/tests/ui/mir/issue66339.rs new file mode 100644 index 000000000..2507af38c --- /dev/null +++ b/tests/ui/mir/issue66339.rs @@ -0,0 +1,13 @@ +// compile-flags: -Z mir-opt-level=3 +// build-pass + +// This used to ICE in const-prop + +fn foo() { + let bar = |_| { }; + let _ = bar("a"); +} + +fn main() { + foo(); +} |