]> git.proxmox.com Git - rustc.git/blame - src/test/ui/traits/object/bounds-cycle-2.rs
Merge tag 'debian/1.52.1+dfsg1-1_exp2' into proxmox/buster
[rustc.git] / src / test / ui / traits / object / bounds-cycle-2.rs
CommitLineData
29967ef6
XL
1// Check that we don't have a cycle when we try to normalize `Self::V` in the
2// bound below.
3
4// check-pass
5
6trait Is {
7 type T;
8}
9
10impl<U> Is for U {
11 type T = U;
12}
13
14trait Super {
15 type V;
16}
17
18trait Obj: Super {
19 type U: Is<T = Self::V>;
20}
21
22fn is_obj<T: ?Sized + Obj>(_: &T) {}
23
24fn f(x: &dyn Obj<U = i32, V = i32>) {
25 is_obj(x)
26}
27
28fn main() {}