]> git.lizzy.rs Git - rust.git/blob - tests/source/type.rs
Quick fix for "impl Trait"
[rust.git] / tests / source / type.rs
1 fn types() {
2     let x: [ Vec   < _ > ] = [];
3     let y:  * mut [ SomeType ; konst_funk() ] = expr();
4     let z: (/*#digits*/ usize, /*exp*/ i16) = funk();
5     let z: ( usize  /*#digits*/ , i16 /*exp*/ ) = funk();
6 }
7
8 struct F {
9     f: extern "C" fn(x: u8, ... /* comment */),
10     g: extern "C" fn(x: u8,/* comment */ ...),
11     h: extern "C" fn(x: u8, ... ),
12     i: extern "C" fn(x: u8, /* comment 4*/ y: String, // comment 3
13                      z: Foo, /* comment */ .../* comment 2*/ ),
14 }
15
16 fn issue_1006(def_id_to_string: for<'a, 'b> unsafe fn(TyCtxt<'b, 'tcx, 'tcx>, DefId) -> String) {}
17
18 fn impl_trait_fn_1() -> impl Fn(i32) -> Option<u8> {}
19
20 fn impl_trait_fn_2<E>() -> impl Future<Item=&'a i64,Error=E> {}