]> git.lizzy.rs Git - rust.git/blob - src/test/ui/regions/regions-wf-trait-object.rs
Rollup merge of #93112 - pietroalbini:pa-cve-2022-21658-nightly, r=pietroalbini
[rust.git] / src / test / ui / regions / regions-wf-trait-object.rs
1 // Check that the explicit lifetime bound (`'b`, in this example) must
2 // outlive all the superbound from the trait (`'a`, in this example).
3
4 trait TheTrait<'t>: 't { }
5
6 struct Foo<'a,'b> {
7     x: Box<dyn TheTrait<'a>+'b> //~ ERROR E0478
8 }
9
10 fn main() { }