diff options
Diffstat (limited to 'tests/ui/dyn-compatibility/default-param-self-projection.rs')
| -rw-r--r-- | tests/ui/dyn-compatibility/default-param-self-projection.rs | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/tests/ui/dyn-compatibility/default-param-self-projection.rs b/tests/ui/dyn-compatibility/default-param-self-projection.rs new file mode 100644 index 00000000000..a440cd735da --- /dev/null +++ b/tests/ui/dyn-compatibility/default-param-self-projection.rs @@ -0,0 +1,17 @@ +trait A<C = <Self as D>::E> {} + +trait D { + type E; +} + +impl A<()> for () {} +impl D for () { + type E = (); +} + +fn f() { + let B: &dyn A = &(); + //~^ ERROR the type parameter `C` must be explicitly specified +} + +fn main() {} |
