rust/tests/ui/traits/next-solver/unsound-region-obligation.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

14 lines
285 B
Rust
Raw Normal View History

//~ ERROR the type `&'a ()` does not fulfill the required lifetime
2024-01-26 19:18:14 +00:00
//@ 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() {}