diff options
Diffstat (limited to 'tests/ui/impl-trait/universal-two-impl-traits.rs')
-rw-r--r-- | tests/ui/impl-trait/universal-two-impl-traits.rs | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/tests/ui/impl-trait/universal-two-impl-traits.rs b/tests/ui/impl-trait/universal-two-impl-traits.rs new file mode 100644 index 000000000..689c24012 --- /dev/null +++ b/tests/ui/impl-trait/universal-two-impl-traits.rs @@ -0,0 +1,16 @@ +use std::fmt::Debug; + +fn foo(x: impl Debug, y: impl Debug) -> String { + let mut a = x; + a = y; //~ ERROR mismatched + format!("{:?}", a) +} + +trait S<T> {} + +fn much_universe<T: S<impl Debug>, U: IntoIterator<Item = impl Iterator<Item = impl Clone>>>( + _: impl Debug + Clone, +) { +} + +fn main() {} |