2019-07-26 16:54:25 -05:00
|
|
|
// run-pass
|
|
|
|
|
2018-09-14 05:20:28 -05:00
|
|
|
#![allow(non_camel_case_types)]
|
|
|
|
#![allow(dead_code)]
|
2015-03-22 15:13:15 -05:00
|
|
|
// pretty-expanded FIXME #23616
|
|
|
|
|
2013-05-24 21:35:29 -05:00
|
|
|
use std::ptr;
|
2012-05-18 08:54:15 -05:00
|
|
|
|
|
|
|
// check that we do not report a type like this as uninstantiable,
|
|
|
|
// even though it would be if the nxt field had type @foo:
|
2013-03-07 18:36:30 -06:00
|
|
|
struct foo(X);
|
2013-01-26 00:46:32 -06:00
|
|
|
|
2015-03-25 19:06:52 -05:00
|
|
|
struct X { x: usize, nxt: *const foo }
|
2012-05-18 08:54:15 -05:00
|
|
|
|
2013-02-01 21:43:17 -06:00
|
|
|
pub fn main() {
|
2013-08-17 10:37:42 -05:00
|
|
|
let _x = foo(X {x: 0, nxt: ptr::null()});
|
2012-05-18 08:54:15 -05:00
|
|
|
}
|