rust/src/test/ui/issues/issue-2063-resource.rs

15 lines
252 B
Rust
Raw Normal View History

// 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 {
2014-10-02 00:10:09 -05:00
x: X,
2012-09-06 21:40:15 -05:00
to_str: (),
}
2012-09-05 17:58:43 -05:00
struct X(Box<S>);
2014-10-02 00:10:09 -05:00
fn main() {}