rust/tests/coverage/generic-unused-impl.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

18 lines
281 B
Rust
Raw Normal View History

2025-01-09 13:24:16 +01:00
// 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() {}