mirror of
https://github.com/rust-lang/rust.git
synced 2025-09-30 08:16:56 +00:00
27 lines
456 B
Rust
27 lines
456 B
Rust
#![allow(incomplete_features)]
|
|
#![feature(const_trait_impl, try_trait_v2, const_try)]
|
|
use std::ops::{FromResidual, Try};
|
|
|
|
struct TryMe;
|
|
struct Error;
|
|
|
|
impl const FromResidual<Error> for TryMe {}
|
|
//~^ ERROR not all trait items implemented
|
|
|
|
impl const Try for TryMe {
|
|
//~^ ERROR not all trait items implemented
|
|
type Output = ();
|
|
type Residual = Error;
|
|
}
|
|
|
|
const fn t() -> TryMe {
|
|
TryMe?;
|
|
TryMe
|
|
}
|
|
|
|
const _: () = {
|
|
t();
|
|
};
|
|
|
|
fn main() {}
|