rust/tests/crashes/126148.rs
Matthias Krüger ff096f83f7 more ice tests
2024-06-16 20:38:08 +02:00

24 lines
325 B
Rust

//@ known-bug: rust-lang/rust#126148
#![feature(effects)]
use std::ops::{FromResidual, Try};
struct TryMe;
struct Error;
impl const FromResidual<Error> for TryMe {}
impl const Try for TryMe {
type Output = ();
type Residual = Error;
}
const fn t() -> TryMe {
TryMe?;
TryMe
}
const _: () = {
t();
};