blob: 7f5bae60d55d9b4837577bac7c1d630236f0bedb (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
#![allow(dead_code)]
struct Foo;
impl<'a> std::convert::TryFrom<&'a String> for Foo {
type Error = std::convert::Infallible;
fn try_from(_: &'a String) -> Result<Self, Self::Error> {
Ok(Foo)
}
}
fn find<E>(_: impl std::convert::TryInto<Foo, Error = E>) {}
fn main() {
find(&String::new());
}
|