rust/tests/ui/traits/const-traits/ice-119717-constant-lifetime.rs
Michael Goulet e91267f3f0 Move tests
2024-10-22 00:03:09 +00:00

16 lines
441 B
Rust

#![allow(incomplete_features)]
#![feature(const_trait_impl, effects, try_trait_v2)]
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() {}