diff options
Diffstat (limited to 'tests/ui/generic-associated-types/issue-80433-reduced.rs')
-rw-r--r-- | tests/ui/generic-associated-types/issue-80433-reduced.rs | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/tests/ui/generic-associated-types/issue-80433-reduced.rs b/tests/ui/generic-associated-types/issue-80433-reduced.rs new file mode 100644 index 000000000..44831a995 --- /dev/null +++ b/tests/ui/generic-associated-types/issue-80433-reduced.rs @@ -0,0 +1,21 @@ +// check-pass + +struct E {} + +trait TestMut { + type Output<'a>; + fn test_mut(&mut self) -> Self::Output<'static>; +} + +impl TestMut for E { + type Output<'a> = usize; + fn test_mut(&mut self) -> Self::Output<'static> { + todo!() + } +} + +fn test_simpler<'a>(_: impl TestMut<Output<'a> = usize>) {} + +fn main() { + test_simpler(E {}); +} |