aboutsummaryrefslogtreecommitdiff
path: root/ui-tests/src/bin
diff options
context:
space:
mode:
Diffstat (limited to 'ui-tests/src/bin')
-rw-r--r--ui-tests/src/bin/assoc_type_no_bound.rs8
-rw-r--r--ui-tests/src/bin/assoc_type_no_bound.stderr5
-rw-r--r--ui-tests/src/bin/assoc_type_undefined.rs6
-rw-r--r--ui-tests/src/bin/assoc_type_undefined.stderr5
-rw-r--r--ui-tests/src/bin/gats.rs8
-rw-r--r--ui-tests/src/bin/gats.stderr5
-rw-r--r--ui-tests/src/bin/method_generics_conflict.rs7
-rw-r--r--ui-tests/src/bin/method_generics_conflict.stderr5
8 files changed, 49 insertions, 0 deletions
diff --git a/ui-tests/src/bin/assoc_type_no_bound.rs b/ui-tests/src/bin/assoc_type_no_bound.rs
new file mode 100644
index 0000000..79c91a2
--- /dev/null
+++ b/ui-tests/src/bin/assoc_type_no_bound.rs
@@ -0,0 +1,8 @@
+#[dynamize::dynamize]
+trait Trait {
+ type A;
+
+ fn f(&self) -> Self::A;
+}
+
+fn main() {}
diff --git a/ui-tests/src/bin/assoc_type_no_bound.stderr b/ui-tests/src/bin/assoc_type_no_bound.stderr
new file mode 100644
index 0000000..c6a118b
--- /dev/null
+++ b/ui-tests/src/bin/assoc_type_no_bound.stderr
@@ -0,0 +1,5 @@
+error: associated type is either undefined or doesn't have a trait bound
+ --> src/bin/assoc_type_no_bound.rs:5:26
+ |
+5 | fn f(&self) -> Self::A;
+ | ^
diff --git a/ui-tests/src/bin/assoc_type_undefined.rs b/ui-tests/src/bin/assoc_type_undefined.rs
new file mode 100644
index 0000000..8faa0f3
--- /dev/null
+++ b/ui-tests/src/bin/assoc_type_undefined.rs
@@ -0,0 +1,6 @@
+#[dynamize::dynamize]
+trait Trait {
+ fn f(&self) -> Self::A;
+}
+
+fn main() {}
diff --git a/ui-tests/src/bin/assoc_type_undefined.stderr b/ui-tests/src/bin/assoc_type_undefined.stderr
new file mode 100644
index 0000000..5fb8bf3
--- /dev/null
+++ b/ui-tests/src/bin/assoc_type_undefined.stderr
@@ -0,0 +1,5 @@
+error: associated type is either undefined or doesn't have a trait bound
+ --> src/bin/assoc_type_undefined.rs:3:26
+ |
+3 | fn f(&self) -> Self::A;
+ | ^
diff --git a/ui-tests/src/bin/gats.rs b/ui-tests/src/bin/gats.rs
new file mode 100644
index 0000000..ca75563
--- /dev/null
+++ b/ui-tests/src/bin/gats.rs
@@ -0,0 +1,8 @@
+#[dynamize::dynamize]
+pub trait MyTrait {
+ type A<'a>: Into<&'a str>;
+
+ fn test1<'b>(&self) -> Self::A<'b>;
+}
+
+fn main() {}
diff --git a/ui-tests/src/bin/gats.stderr b/ui-tests/src/bin/gats.stderr
new file mode 100644
index 0000000..e8c73c4
--- /dev/null
+++ b/ui-tests/src/bin/gats.stderr
@@ -0,0 +1,5 @@
+error: dynamize does not (yet?) support generic associated types
+ --> src/bin/gats.rs:3:12
+ |
+3 | type A<'a>: Into<&'a str>;
+ | ^^
diff --git a/ui-tests/src/bin/method_generics_conflict.rs b/ui-tests/src/bin/method_generics_conflict.rs
new file mode 100644
index 0000000..e76e05f
--- /dev/null
+++ b/ui-tests/src/bin/method_generics_conflict.rs
@@ -0,0 +1,7 @@
+#[dynamize::dynamize]
+trait Trait {
+ fn a<A>(&self, a: A);
+ fn b<A: std::fmt::Display>(&self, a: A);
+}
+
+fn main() {}
diff --git a/ui-tests/src/bin/method_generics_conflict.stderr b/ui-tests/src/bin/method_generics_conflict.stderr
new file mode 100644
index 0000000..71a7356
--- /dev/null
+++ b/ui-tests/src/bin/method_generics_conflict.stderr
@@ -0,0 +1,5 @@
+error: dynamize failure: there exists a same-named method generic with different bounds
+ --> src/bin/method_generics_conflict.rs:4:10
+ |
+4 | fn b<A: std::fmt::Display>(&self, a: A);
+ | ^