]> git.proxmox.com Git - rustc.git/blob - src/test/ui/traits/traits-issue-22655.rs
New upstream version 1.51.0+dfsg1
[rustc.git] / src / test / ui / traits / traits-issue-22655.rs
1 // run-pass
2 #![allow(dead_code)]
3 // Regression test for issue #22655: This test should not lead to
4 // infinite recursion.
5
6 // pretty-expanded FIXME #23616
7
8 unsafe impl<T: Send + ?Sized> Send for Unique<T> { }
9
10 pub struct Unique<T:?Sized> {
11 pointer: *const T,
12 }
13
14 pub struct Node<V> {
15 vals: V,
16 edges: Unique<Node<V>>,
17 }
18
19 fn is_send<T: Send>() {}
20
21 fn main() {
22 is_send::<Node<&'static ()>>();
23 }