summaryrefslogtreecommitdiffstats
path: root/third_party/rust/async-trait/tests/ui/unsupported-self.rs
diff options
context:
space:
mode:
Diffstat (limited to 'third_party/rust/async-trait/tests/ui/unsupported-self.rs')
-rw-r--r--third_party/rust/async-trait/tests/ui/unsupported-self.rs15
1 files changed, 15 insertions, 0 deletions
diff --git a/third_party/rust/async-trait/tests/ui/unsupported-self.rs b/third_party/rust/async-trait/tests/ui/unsupported-self.rs
new file mode 100644
index 0000000000..5868c614ad
--- /dev/null
+++ b/third_party/rust/async-trait/tests/ui/unsupported-self.rs
@@ -0,0 +1,15 @@
+use async_trait::async_trait;
+
+#[async_trait]
+pub trait Trait {
+ async fn method();
+}
+
+#[async_trait]
+impl Trait for &'static str {
+ async fn method() {
+ let _ = Self;
+ }
+}
+
+fn main() {}