diff options
Diffstat (limited to 'src/test/ui/typeck/issue-80207-unsized-return.rs')
-rw-r--r-- | src/test/ui/typeck/issue-80207-unsized-return.rs | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/src/test/ui/typeck/issue-80207-unsized-return.rs b/src/test/ui/typeck/issue-80207-unsized-return.rs new file mode 100644 index 000000000..75430da14 --- /dev/null +++ b/src/test/ui/typeck/issue-80207-unsized-return.rs @@ -0,0 +1,20 @@ +// check-pass + +trait Foo { + fn do_stuff() -> Self; +} + +trait Bar { + type Output; +} + +impl<T> Foo for dyn Bar<Output = T> +where + Self: Sized, +{ + fn do_stuff() -> Self { + todo!() + } +} + +fn main() {} |