]> git.lizzy.rs Git - rust.git/blob - tests/ui/traits/issue-22655.rs
Auto merge of #105716 - chriswailes:ndk-update-redux, r=pietroalbini
[rust.git] / tests / ui / 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 }