0,
];
- let y = [
- /* comment */ 1,
- 2, /* post comment */
- 3,
- ];
+ let y = [/* comment */ 1, 2 /* post comment */, 3];
let xy = [
strukt {
0,
];
- let y = [
- // comment
- 1,
- 2, // post comment
- 3,
- ];
+ let y = [/* comment */ 1, 2 /* post comment */, 3];
let xy = [
strukt {
// Does this work?
y: World,
) {
- simple(
- // does this preserve comments now?
- 42,
- NoWay,
- )
+ simple(/* does this preserve comments now? */ 42, NoWay)
}
fn generic<T>(arg: T) -> &SomeType
S(.., true) => (),
S(..) => (),
S(_) => (),
- S(
- // ..
- ..
- ) => (),
- S(
- // ..
- ..,
- true,
- ) => (),
+ S(/* .. */ ..) => (),
+ S(/* .. */ .., true) => (),
}
match y {
(.., true) => (),
(..) => (),
(_,) => (),
- (
- // ..
- ..
- ) => (),
- (
- // ..
- ..,
- true,
- ) => (),
+ (/* .. */ ..) => (),
+ (/* .. */ .., true) => (),
}
}
Tup(_) => "nah",
Quad(_, _, x, _) => " also no rewrite",
Quad(x, ..) => "condense me pls",
- Weird(
- x,
- _,
- _,
- // dont condense before
- ..
- ) => "pls work",
+ Weird(x, _, _, /* dont condense before */ ..) => "pls work",
}
}
fn types() {
let x: [Vec<_>] = [];
let y: *mut [SomeType; konst_funk()] = expr();
- let z: (
- // #digits
- usize,
- // exp
- i16,
- ) = funk();
+ let z: (/* #digits */ usize, /* exp */ i16) = funk();
let z: (usize /* #digits */, i16 /* exp */) = funk();
}
struct F {
f: extern "C" fn(x: u8, ... /* comment */),
- g: extern "C" fn(
- x: u8,
- // comment
- ...
- ),
+ g: extern "C" fn(x: u8, /* comment */ ...),
h: extern "C" fn(x: u8, ...),
i: extern "C" fn(
x: u8,