Skip to content

Commit 7684842

Browse files
committed
tests: add regression test for stage2 ICE
1 parent 6de9a44 commit 7684842

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
//@ check-pass
2+
//@ compile-flags: --crate-type=lib
3+
4+
use std::marker::PhantomData;
5+
6+
pub trait ZeroMapKV<'a> {
7+
type Container;
8+
}
9+
10+
pub trait ZeroFrom<'zf, C: ?Sized> {}
11+
12+
pub struct ZeroMap<'a, K: ZeroMapKV<'a>>(PhantomData<&'a K>);
13+
14+
impl<'zf, 's, K> ZeroFrom<'zf, ZeroMap<'s, K>> for ZeroMap<'zf, K>
15+
where
16+
K: for<'b> ZeroMapKV<'b>,
17+
<K as ZeroMapKV<'zf>>::Container: ZeroFrom<'zf, <K as ZeroMapKV<'s>>::Container>,
18+
{
19+
}

0 commit comments

Comments
 (0)