about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--src/test/incremental/const-generics/issue-68477.rs23
1 files changed, 23 insertions, 0 deletions
diff --git a/src/test/incremental/const-generics/issue-68477.rs b/src/test/incremental/const-generics/issue-68477.rs
new file mode 100644
index 00000000000..925931bc4a6
--- /dev/null
+++ b/src/test/incremental/const-generics/issue-68477.rs
@@ -0,0 +1,23 @@
+// edition:2018
+// revisions:rpass1
+#![feature(const_generics)]
+
+const FOO: usize = 1;
+
+struct Container<T> {
+    val: std::marker::PhantomData<T>,
+    blah: [(); FOO]
+}
+
+async fn dummy() {}
+
+async fn foo() {
+    let a: Container<&'static ()>;
+    dummy().await;
+}
+
+fn is_send<T: Send>(_: T) {}
+
+fn main() {
+    is_send(foo());
+}