diff options
Diffstat (limited to '')
-rw-r--r-- | src/tools/rustfmt/tests/source/issue-811.rs | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/src/tools/rustfmt/tests/source/issue-811.rs b/src/tools/rustfmt/tests/source/issue-811.rs new file mode 100644 index 000000000..b7a89b5d0 --- /dev/null +++ b/src/tools/rustfmt/tests/source/issue-811.rs @@ -0,0 +1,19 @@ +trait FooTrait<T>: Sized { + type Bar: BarTrait<T>; +} + +trait BarTrait<T>: Sized { + type Baz; + fn foo(); +} + +type Foo<T: FooTrait> = <<T as FooTrait<U>>::Bar as BarTrait<U>>::Baz; +type Bar<T: BarTrait> = <T as BarTrait<U>>::Baz; + +fn some_func<T: FooTrait<U>, U>() { + <<T as FooTrait<U>>::Bar as BarTrait<U>>::foo(); +} + +fn some_func<T: BarTrait<U>>() { + <T as BarTrait<U>>::foo(); +} |