about summary refs log tree commit diff
path: root/tests/ui/async-await/issue-66312.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ui/async-await/issue-66312.rs')
-rw-r--r--tests/ui/async-await/issue-66312.rs14
1 files changed, 14 insertions, 0 deletions
diff --git a/tests/ui/async-await/issue-66312.rs b/tests/ui/async-await/issue-66312.rs
new file mode 100644
index 00000000000..9224971ecb1
--- /dev/null
+++ b/tests/ui/async-await/issue-66312.rs
@@ -0,0 +1,14 @@
+// edition:2018
+
+trait Test<T> {
+    fn is_some(self: T); //~ ERROR invalid `self` parameter type
+}
+
+async fn f() {
+    let x = Some(2);
+    if x.is_some() {
+        println!("Some");
+    }
+}
+
+fn main() {}