]> git.lizzy.rs Git - rust.git/blob - src/test/ui/associated-type-bounds/assoc-type-bound-through-where-clause.rs
Rollup merge of #105955 - Nilstrieb:no-trivial-opt-wrappers-we-have-field-accesses...
[rust.git] / src / test / ui / associated-type-bounds / assoc-type-bound-through-where-clause.rs
1 // Check that `where Self::Output: Copy` is turned into a bound on `Op::Output`.
2
3 //check-pass
4
5 trait Op
6 where
7     Self::Output: Copy,
8 {
9     type Output;
10 }
11
12 fn duplicate<T: Op>(x: T::Output) -> (T::Output, T::Output) {
13     (x, x)
14 }
15
16 fn main() {}