2024-06-25 05:44:00 -05:00
|
|
|
#![allow(incomplete_features)]
|
2024-10-30 13:03:44 -05:00
|
|
|
#![feature(const_trait_impl, try_trait_v2)]
|
2024-06-25 05:44:00 -05:00
|
|
|
|
|
|
|
use std::ops::FromResidual;
|
|
|
|
|
|
|
|
impl<T> const FromResidual for T {
|
|
|
|
//~^ ERROR const `impl` for trait `FromResidual` which is not marked with `#[const_trait]`
|
|
|
|
//~| type parameter `T` must be used as the type parameter for some local type
|
|
|
|
fn from_residual(t: T) -> _ {
|
|
|
|
//~^ the placeholder `_` is not allowed
|
|
|
|
t
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
fn main() {}
|