rust/tests/crashes/129127.rs
2024-08-15 22:44:16 +02:00

22 lines
380 B
Rust

//@ known-bug: rust-lang/rust#129127
//@ compile-flags: -Zmir-opt-level=5 -Zvalidate-mir -Zcross-crate-inline-threshold=always
pub struct Rows<'a>();
impl<'a> Iterator for Rows<'a> {
type Item = ();
fn next() -> Option<Self::Item> {
let mut rows = Rows();
rows.map(|row| row).next()
}
}
fn main() {
let mut rows = Rows();
rows.next();
}