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