]> git.lizzy.rs Git - rust.git/blob - tests/ui/recursion/instantiable.rs
Rollup merge of #106759 - compiler-errors:revert-105255, r=cjgillot
[rust.git] / tests / ui / recursion / 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 }