]> git.lizzy.rs Git - rust.git/blob - src/test/ui/issues/issue-37311-type-length-limit/issue-37311.rs
Require Drop impls to have the same constness on its bounds as the bounds on the...
[rust.git] / src / test / ui / issues / issue-37311-type-length-limit / issue-37311.rs
1 // build-fail
2 // normalize-stderr-test: ".nll/" -> "/"
3
4 trait Mirror {
5     type Image;
6 }
7
8 impl<T> Mirror for T { type Image = T; }
9
10 trait Foo {
11     fn recurse(&self);
12 }
13
14 impl<T> Foo for T {
15     #[allow(unconditional_recursion)]
16     fn recurse(&self) {
17         (self, self).recurse(); //~ ERROR reached the recursion limit
18     }
19 }
20
21 fn main() {
22     ().recurse();
23 }