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