mirror of
https://github.com/rust-lang/rust.git
synced 2025-02-12 15:04:03 +00:00
Merge pull request #1726 from topecongiro/tuple-overflow
Apply the same overflowing rule to tuple as function call
This commit is contained in:
commit
f2fd4fbf2c
@ -2309,8 +2309,8 @@ pub fn can_be_overflowed_expr(context: &RewriteContext, expr: &ast::Expr, args_l
|
||||
ast::ExprKind::Call(..) |
|
||||
ast::ExprKind::MethodCall(..) |
|
||||
ast::ExprKind::Mac(..) |
|
||||
ast::ExprKind::Struct(..) => context.use_block_indent() && args_len == 1,
|
||||
ast::ExprKind::Tup(..) => context.use_block_indent(),
|
||||
ast::ExprKind::Struct(..) |
|
||||
ast::ExprKind::Tup(..) => context.use_block_indent() && args_len == 1,
|
||||
ast::ExprKind::AddrOf(_, ref expr) |
|
||||
ast::ExprKind::Box(ref expr) |
|
||||
ast::ExprKind::Try(ref expr) |
|
||||
|
@ -45,3 +45,8 @@ fn issue775() {
|
||||
mk_object(&[("d".to_string(), String("".to_string()))])]))]);
|
||||
}
|
||||
}
|
||||
|
||||
fn issue1725() {
|
||||
bench_antialiased_lines!(bench_draw_antialiased_line_segment_diagonal, (10, 10), (450, 450));
|
||||
bench_antialiased_lines!(bench_draw_antialiased_line_segment_shallow, (10, 10), (450, 80));
|
||||
}
|
||||
|
@ -257,10 +257,13 @@ fn combine_block() {
|
||||
foo(param)
|
||||
});
|
||||
|
||||
do_thing(x, (1, 2, 3, |param| {
|
||||
action();
|
||||
foo(param)
|
||||
}));
|
||||
do_thing(
|
||||
x,
|
||||
(1, 2, 3, |param| {
|
||||
action();
|
||||
foo(param)
|
||||
}),
|
||||
);
|
||||
|
||||
Ok(some_function(
|
||||
lllllllllong_argument_one,
|
||||
|
@ -47,14 +47,17 @@ fn b() {
|
||||
}
|
||||
|
||||
fn issue550() {
|
||||
self.visitor.visit_volume(self.level.sector_id(sector), (
|
||||
floor_y,
|
||||
if is_sky_flat(ceil_tex) {
|
||||
from_wad_height(self.height_range.1)
|
||||
} else {
|
||||
ceil_y
|
||||
},
|
||||
));
|
||||
self.visitor.visit_volume(
|
||||
self.level.sector_id(sector),
|
||||
(
|
||||
floor_y,
|
||||
if is_sky_flat(ceil_tex) {
|
||||
from_wad_height(self.height_range.1)
|
||||
} else {
|
||||
ceil_y
|
||||
},
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
fn issue775() {
|
||||
@ -75,3 +78,16 @@ fn issue775() {
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
fn issue1725() {
|
||||
bench_antialiased_lines!(
|
||||
bench_draw_antialiased_line_segment_diagonal,
|
||||
(10, 10),
|
||||
(450, 450)
|
||||
);
|
||||
bench_antialiased_lines!(
|
||||
bench_draw_antialiased_line_segment_shallow,
|
||||
(10, 10),
|
||||
(450, 80)
|
||||
);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user