We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b2cb269 commit e6a0420Copy full SHA for e6a0420
tests/ui/field_projections/send.rs
@@ -0,0 +1,21 @@
1
+//@ revisions: old next
2
+//@ [next] compile-flags: -Znext-solver
3
+//@ run-pass
4
+#![feature(field_projections)]
5
+#![allow(incomplete_features)]
6
+use std::field::field_of;
7
+
8
+struct Foo {
9
+ field: u32,
10
+}
11
+struct Bar {
12
+ bar_field: u32,
13
14
+unsafe impl Send for field_of!(Bar, bar_field) {}
15
16
+fn is_send<T: Send>() {}
17
18
+fn main() {
19
+ is_send::<field_of!(Bar, bar_field)>();
20
+ is_send::<field_of!(Foo, field)>();
21
0 commit comments