2019-07-26 21:54:25 +00:00
|
|
|
// run-pass
|
|
|
|
|
2018-09-14 10:20:28 +00:00
|
|
|
#![allow(non_camel_case_types)]
|
|
|
|
#![allow(dead_code)]
|
2015-03-22 20:13:15 +00:00
|
|
|
// pretty-expanded FIXME #23616
|
|
|
|
|
2013-05-25 02:35:29 +00:00
|
|
|
use std::ptr;
|
2012-05-18 13:54:15 +00: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-08 00:36:30 +00:00
|
|
|
struct foo(X);
|
2013-01-26 06:46:32 +00:00
|
|
|
|
2015-03-26 00:06:52 +00:00
|
|
|
struct X { x: usize, nxt: *const foo }
|
2012-05-18 13:54:15 +00:00
|
|
|
|
2013-02-02 03:43:17 +00:00
|
|
|
pub fn main() {
|
2013-08-17 15:37:42 +00:00
|
|
|
let _x = foo(X {x: 0, nxt: ptr::null()});
|
2012-05-18 13:54:15 +00:00
|
|
|
}
|