rust/tests/ui/traits/next-solver/unsound-region-obligation.rs
2024-05-30 15:52:29 -04:00

14 lines
285 B
Rust

//~ ERROR the type `&'a ()` does not fulfill the required lifetime
//@ compile-flags: -Znext-solver
// Regression test for rust-lang/trait-system-refactor-initiative#59
trait StaticTy {
type Item<'a>: 'static;
}
impl StaticTy for () {
type Item<'a> = &'a ();
}
fn main() {}