about summary refs log tree commit diff
path: root/tests/ui/dyn-compatibility/default-param-self-projection.stderr
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ui/dyn-compatibility/default-param-self-projection.stderr')
-rw-r--r--tests/ui/dyn-compatibility/default-param-self-projection.stderr18
1 files changed, 18 insertions, 0 deletions
diff --git a/tests/ui/dyn-compatibility/default-param-self-projection.stderr b/tests/ui/dyn-compatibility/default-param-self-projection.stderr
new file mode 100644
index 00000000000..ea252a99b04
--- /dev/null
+++ b/tests/ui/dyn-compatibility/default-param-self-projection.stderr
@@ -0,0 +1,18 @@
+error[E0393]: the type parameter `C` must be explicitly specified
+  --> $DIR/default-param-self-projection.rs:13:17
+   |
+LL | trait A<C = <Self as D>::E> {}
+   | --------------------------- type parameter `C` must be specified for this
+...
+LL |     let B: &dyn A = &();
+   |                 ^
+   |
+   = note: because the parameter default references `Self`, the parameter must be specified on the object type
+help: set the type parameter to the desired type
+   |
+LL |     let B: &dyn A<C> = &();
+   |                  +++
+
+error: aborting due to 1 previous error
+
+For more information about this error, try `rustc --explain E0393`.