diff options
Diffstat (limited to '')
-rw-r--r-- | src/test/ui/issues/issue-2063-resource.rs | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/test/ui/issues/issue-2063-resource.rs b/src/test/ui/issues/issue-2063-resource.rs new file mode 100644 index 000000000..1d0527447 --- /dev/null +++ b/src/test/ui/issues/issue-2063-resource.rs @@ -0,0 +1,14 @@ +// check-pass +#![allow(dead_code)] +// test that autoderef of a type like this does not +// cause compiler to loop. Note that no instances +// of such a type could ever be constructed. + +struct S { + x: X, + to_str: (), +} + +struct X(Box<S>); + +fn main() {} |