summaryrefslogtreecommitdiffstats
path: root/tests/ui/issues/issue-21950.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ui/issues/issue-21950.rs')
-rw-r--r--tests/ui/issues/issue-21950.rs13
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/ui/issues/issue-21950.rs b/tests/ui/issues/issue-21950.rs
new file mode 100644
index 000000000..72a98bd8d
--- /dev/null
+++ b/tests/ui/issues/issue-21950.rs
@@ -0,0 +1,13 @@
+trait Add<Rhs=Self> {
+ type Output;
+}
+
+impl Add for i32 {
+ type Output = i32;
+}
+
+fn main() {
+ let x = &10 as &dyn Add;
+ //~^ ERROR E0393
+ //~| ERROR E0191
+}