]> git.lizzy.rs Git - rust.git/blob - tests/ui/diagnostic-width/E0271.rs
Rollup merge of #106596 - estebank:verbose-e0271, r=compiler-errors
[rust.git] / tests / ui / diagnostic-width / E0271.rs
1 // compile-flags: --diagnostic-width=40
2 // normalize-stderr-test: "long-type-\d+" -> "long-type-hash"
3 trait Future {
4     type Error;
5 }
6
7 impl<T, E> Future for Result<T, E> {
8     type Error = E;
9 }
10
11 impl<T> Future for Option<T> {
12     type Error = ();
13 }
14
15 struct Foo;
16
17 fn foo() -> Box<dyn Future<Error=Foo>> {
18     Box::new( //~ ERROR E0271
19         Ok::<_, ()>(
20             Err::<(), _>(
21                 Ok::<_, ()>(
22                     Err::<(), _>(
23                         Ok::<_, ()>(
24                             Err::<(), _>(Some(5))
25                         )
26                     )
27                 )
28             )
29         )
30     )
31 }
32 fn main() {
33 }