rust/tests/crashes/129127.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

22 lines
380 B
Rust
Raw Normal View History

2024-08-15 15:44:16 -05:00
//@ 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();
}