From 680c65dc976bbf02936bd9eb1cd44ea62bfa0ebc Mon Sep 17 00:00:00 2001 From: topecongiro Date: Tue, 8 May 2018 06:23:14 +0900 Subject: [PATCH] Update tests to use the absolute position for small parent heuristic --- tests/target/chains.rs | 8 ++++---- tests/target/configs/indent_style/block_call.rs | 3 ++- tests/target/expr-block.rs | 3 ++- tests/target/expr.rs | 3 ++- tests/target/try-conversion.rs | 3 ++- 5 files changed, 12 insertions(+), 8 deletions(-) diff --git a/tests/target/chains.rs b/tests/target/chains.rs index d3e3cad5ebbd..172a7815c391 100644 --- a/tests/target/chains.rs +++ b/tests/target/chains.rs @@ -151,7 +151,8 @@ fn try_shorthand() { let zzzz = expr?.another?.another?.another?.another?; let aaa = x??????????????????????????????????????????????????????????????????????????; - let y = a.very + let y = a + .very .loooooooooooooooooooooooooooooooooooooong() .chain() .inside() @@ -206,9 +207,8 @@ fn issue2126() { { { { - let x = self.span_from( - sub_span.expect("No span found for struct arant variant"), - ); + let x = self + .span_from(sub_span.expect("No span found for struct arant variant")); self.sspanpan_from_span( sub_span.expect("No span found for struct variant"), ); diff --git a/tests/target/configs/indent_style/block_call.rs b/tests/target/configs/indent_style/block_call.rs index 4e4c9465fe83..77f3c551f0a5 100644 --- a/tests/target/configs/indent_style/block_call.rs +++ b/tests/target/configs/indent_style/block_call.rs @@ -25,7 +25,8 @@ fn main() { // #1380 { { - let creds = self.client + let creds = self + .client .client_credentials(&self.config.auth.oauth2.id, &self.config.auth.oauth2.secret)?; } } diff --git a/tests/target/expr-block.rs b/tests/target/expr-block.rs index 859b4562dff3..d5a6762d12b5 100644 --- a/tests/target/expr-block.rs +++ b/tests/target/expr-block.rs @@ -283,6 +283,7 @@ fn issue_1862() { } fn issue_1878() { - let channel: &str = seq.next_element()? + let channel: &str = seq + .next_element()? .ok_or_else(|| de::Error::invalid_length(2, &self))?; } diff --git a/tests/target/expr.rs b/tests/target/expr.rs index 5f12ec3ff7a4..34753bc92713 100644 --- a/tests/target/expr.rs +++ b/tests/target/expr.rs @@ -404,7 +404,8 @@ impl Foo { let x = match () { () => { let i; - i == self.install_config + i == self + .install_config .storage .experimental_compressed_block_size as usize } diff --git a/tests/target/try-conversion.rs b/tests/target/try-conversion.rs index e16fba278d2c..04992a0a0f6c 100644 --- a/tests/target/try-conversion.rs +++ b/tests/target/try-conversion.rs @@ -3,7 +3,8 @@ fn main() { let x = some_expr()?; - let y = a.very + let y = a + .very .loooooooooooooooooooooooooooooooooooooong() .chain() .inside()