Files
rust/tests/ui/traits/next-solver/unsound-region-obligation.rs
2025-02-05 18:32:06 +00:00

14 lines
290 B
Rust

//@ 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 ();
//~^ ERROR the type `&'a ()` does not fulfill the required lifetime
}
fn main() {}