about summary refs log tree commit diff
path: root/tests/coverage/generic-unused-impl.rs
blob: 862313894500664b32eeb8748971906056c50603 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
// Regression test for #135235.
trait Foo {
    type Assoc;

    fn from(s: Self::Assoc) -> Self;
}

struct W<T>(T);

impl<T: Foo> From<[T::Assoc; 1]> for W<T> {
    fn from(from: [T::Assoc; 1]) -> Self {
        let [item] = from;
        W(Foo::from(item))
    }
}

fn main() {}