about summary refs log tree commit diff
path: root/tests/ui/traits/next-solver/unsound-region-obligation.rs
blob: e7fa60a2e3f60bba8c2d66df21a1c9749850f6a9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
//@ 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() {}