Allow extending a chain after raw string literal
This commit is contained in:
parent
a87a4450aa
commit
b99f3cb447
@ -111,9 +111,10 @@ pub fn trimmed_last_line_width(s: &str) -> usize {
|
|||||||
#[inline]
|
#[inline]
|
||||||
pub fn last_line_extendable(s: &str) -> bool {
|
pub fn last_line_extendable(s: &str) -> bool {
|
||||||
s.lines().last().map_or(false, |s| {
|
s.lines().last().map_or(false, |s| {
|
||||||
s.trim()
|
s.ends_with("\"#") ||
|
||||||
.chars()
|
s.trim()
|
||||||
.all(|c| c == ')' || c == ']' || c == '}' || c == '?')
|
.chars()
|
||||||
|
.all(|c| c == ')' || c == ']' || c == '}' || c == '?')
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -152,3 +152,14 @@ fn issue_1004() {
|
|||||||
})
|
})
|
||||||
?;
|
?;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fn issue1392() {
|
||||||
|
test_method(r#"
|
||||||
|
if foo {
|
||||||
|
a();
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
b();
|
||||||
|
}
|
||||||
|
"#.trim());
|
||||||
|
}
|
||||||
|
@ -169,3 +169,16 @@ fn issue_1004() {
|
|||||||
in_binder(f, tcx, &ty::Binder(""), Some(tap))
|
in_binder(f, tcx, &ty::Binder(""), Some(tap))
|
||||||
})?;
|
})?;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fn issue1392() {
|
||||||
|
test_method(
|
||||||
|
r#"
|
||||||
|
if foo {
|
||||||
|
a();
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
b();
|
||||||
|
}
|
||||||
|
"#.trim(),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user