2025-01-09 13:24:16 +01:00
|
|
|
// Regression test for #135235.
|
2025-01-08 17:31:40 +00:00
|
|
|
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() {}
|