2019-11-04 00:00:00 +00:00
|
|
|
// check-pass
|
2018-09-25 23:51:35 +02:00
|
|
|
#![allow(dead_code)]
|
2012-03-28 13:42:33 -07:00
|
|
|
// 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.
|
2015-06-28 10:38:28 -07:00
|
|
|
|
|
|
|
struct S {
|
2014-10-02 08:10:09 +03:00
|
|
|
x: X,
|
2012-09-06 19:40:15 -07:00
|
|
|
to_str: (),
|
2012-03-28 13:42:33 -07:00
|
|
|
}
|
2012-09-05 15:58:43 -07:00
|
|
|
|
2015-06-28 10:38:28 -07:00
|
|
|
struct X(Box<S>);
|
2012-03-28 13:42:33 -07:00
|
|
|
|
2014-10-02 08:10:09 +03:00
|
|
|
fn main() {}
|