rust/src/test/ui/mir/mir-inlining/ice-issue-77306-1.rs

18 lines
296 B
Rust
Raw Normal View History

// run-pass
2020-10-04 09:40:06 -05:00
// compile-flags:-Zmir-opt-level=2
// Previously ICEd because we did not normalize during inlining,
// see https://github.com/rust-lang/rust/pull/77306 for more discussion.
2020-10-04 09:40:06 -05:00
pub fn write() {
create()()
}
pub fn create() -> impl FnOnce() {
|| ()
}
fn main() {
write();
}