summaryrefslogtreecommitdiffstats
path: root/src/test/ui/issues/issue-21950.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/ui/issues/issue-21950.rs')
-rw-r--r--src/test/ui/issues/issue-21950.rs13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/test/ui/issues/issue-21950.rs b/src/test/ui/issues/issue-21950.rs
new file mode 100644
index 000000000..72a98bd8d
--- /dev/null
+++ b/src/test/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
+}