summaryrefslogtreecommitdiffstats
path: root/tests/ui/self/self-type-param.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ui/self/self-type-param.rs')
-rw-r--r--tests/ui/self/self-type-param.rs19
1 files changed, 19 insertions, 0 deletions
diff --git a/tests/ui/self/self-type-param.rs b/tests/ui/self/self-type-param.rs
new file mode 100644
index 000000000..5eb8c3622
--- /dev/null
+++ b/tests/ui/self/self-type-param.rs
@@ -0,0 +1,19 @@
+// build-pass (FIXME(62277): could be check-pass?)
+#![allow(dead_code)]
+// pretty-expanded FIXME #23616
+
+trait MyTrait {
+ fn f(&self) -> Self;
+}
+
+struct S {
+ x: isize
+}
+
+impl MyTrait for S {
+ fn f(&self) -> S {
+ S { x: 3 }
+ }
+}
+
+pub fn main() {}