]>
git.proxmox.com Git - rustc.git/blob - tests/ui/associated-types/defaults-cyclic-fail-2.rs
1 #![feature(associated_type_defaults)]
3 // A more complex version of `defaults-cyclic-fail-1.rs`, with non-trivial defaults.
5 // Having a cycle in assoc. type defaults is okay...
27 type A
= Box
<Self::B
>;
28 //~^ ERROR overflow evaluating the requirement `<bool as Tr>::B == _`
30 // (the error is shown twice for some reason)
33 type B
= &'
static Self::A
;
34 //~^ ERROR overflow evaluating the requirement `<usize as Tr>::A == _`
38 // We don't check that the types project correctly because the cycle errors stop compilation
39 // before `main` is type-checked.
40 // `defaults-cyclic-pass-2.rs` does this.