summaryrefslogtreecommitdiffstats
path: root/src/test/ui/issues/issue-34503.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/ui/issues/issue-34503.rs')
-rw-r--r--src/test/ui/issues/issue-34503.rs11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/test/ui/issues/issue-34503.rs b/src/test/ui/issues/issue-34503.rs
new file mode 100644
index 000000000..26e735840
--- /dev/null
+++ b/src/test/ui/issues/issue-34503.rs
@@ -0,0 +1,11 @@
+// run-pass
+fn main() {
+ struct X;
+ trait Foo<T> {
+ fn foo(&self) where (T, Option<T>): Ord {}
+ fn bar(&self, x: &Option<T>) -> bool
+ where Option<T>: Ord { *x < *x }
+ }
+ impl Foo<X> for () {}
+ let _ = &() as &dyn Foo<X>;
+}