rust/tests/crashes/131294-2.rs

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

26 lines
559 B
Rust
Raw Normal View History

2024-10-09 08:34:45 -05:00
//@ known-bug: #131294
//@ compile-flags: -Zmir-opt-level=5 -Zvalidate-mir -Zcross-crate-inline-threshold=always
// https://github.com/rust-lang/rust/issues/131294#issuecomment-2395088049 second comment
struct Rows;
impl Iterator for Rows {
type Item = String;
fn next() -> Option<String> {
let args = format_args!("Hello world");
{
match args.as_str() {
Some(t) => t.to_owned(),
None => String::new(),
}
}
.into()
}
}
fn main() {
Rows.next();
}