]> git.proxmox.com Git - rustc.git/blob - src/test/ui/inference/cannot-infer-partial-try-return.rs
Update unsuspicious file list
[rustc.git] / src / test / ui / inference / cannot-infer-partial-try-return.rs
1 struct QualifiedError<E>(E);
2
3 impl<E, T> From<E> for QualifiedError<T>
4 where
5 E: std::error::Error,
6 T: From<E>,
7 {
8 fn from(e: E) -> QualifiedError<T> {
9 QualifiedError(e.into())
10 }
11 }
12
13 fn infallible() -> Result<(), std::convert::Infallible> {
14 Ok(())
15 }
16
17 fn main() {
18 let x = || -> Result<_, QualifiedError<_>> {
19 infallible()?;
20 Ok(())
21 //~^ ERROR type annotations needed
22 };
23 }