2017-01-16 14:50:27 +13:00
|
|
|
// rustfmt-normalize_comments: true
|
2015-10-17 14:19:55 +02:00
|
|
|
fn types() {
|
|
|
|
let x: [Vec<_>] = [];
|
|
|
|
let y: *mut [SomeType; konst_funk()] = expr();
|
2017-08-27 14:41:30 +09:00
|
|
|
let z: (/* #digits */ usize, /* exp */ i16) = funk();
|
2015-10-17 15:56:53 +02:00
|
|
|
let z: (usize /* #digits */, i16 /* exp */) = funk();
|
2015-10-17 14:19:55 +02:00
|
|
|
}
|
2016-04-11 21:20:03 +12:00
|
|
|
|
|
|
|
struct F {
|
|
|
|
f: extern "C" fn(x: u8, ... /* comment */),
|
2017-08-27 14:41:30 +09:00
|
|
|
g: extern "C" fn(x: u8, /* comment */ ...),
|
2016-04-11 21:20:03 +12:00
|
|
|
h: extern "C" fn(x: u8, ...),
|
2017-06-18 02:04:03 +09:00
|
|
|
i: extern "C" fn(
|
|
|
|
x: u8,
|
|
|
|
// comment 4
|
|
|
|
y: String, // comment 3
|
|
|
|
z: Foo,
|
|
|
|
// comment
|
2017-07-13 20:32:46 +09:00
|
|
|
... // comment 2
|
2017-06-18 02:04:03 +09:00
|
|
|
),
|
2016-04-11 21:20:03 +12:00
|
|
|
}
|
2016-05-27 10:39:28 +12:00
|
|
|
|
|
|
|
fn issue_1006(def_id_to_string: for<'a, 'b> unsafe fn(TyCtxt<'b, 'tcx, 'tcx>, DefId) -> String) {}
|
2016-10-13 12:15:06 -07:00
|
|
|
|
|
|
|
fn impl_trait_fn_1() -> impl Fn(i32) -> Option<u8> {}
|
|
|
|
|
|
|
|
fn impl_trait_fn_2<E>() -> impl Future<Item = &'a i64, Error = E> {}
|
2017-01-06 16:06:09 +13:00
|
|
|
|
|
|
|
fn issue_1234() {
|
|
|
|
do_parse!(name: take_while1!(is_token) >> (Header))
|
|
|
|
}
|