mirror of
https://github.com/rust-lang/rust.git
synced 2024-12-02 11:44:28 +00:00
24 lines
325 B
Rust
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();
|
|
};
|