]> git.lizzy.rs Git - rust.git/blob - src/test/ui/instantiable.rs
Auto merge of #87284 - Aaron1011:remove-paren-special, r=petrochenkov
[rust.git] / src / test / ui / instantiable.rs
1 // run-pass
2
3 #![allow(non_camel_case_types)]
4 #![allow(dead_code)]
5 // pretty-expanded FIXME #23616
6
7 use std::ptr;
8
9 // check that we do not report a type like this as uninstantiable,
10 // even though it would be if the nxt field had type @foo:
11 struct foo(X);
12
13 struct X { x: usize, nxt: *const foo }
14
15 pub fn main() {
16     let _x = foo(X {x: 0, nxt: ptr::null()});
17 }