Skip to content

Commit 746bf48

Browse files
chore: bump toolchain and apply minor updates
1 parent f35f252 commit 746bf48

File tree

4 files changed

+4
-35
lines changed

4 files changed

+4
-35
lines changed

rust-toolchain

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
[toolchain]
2-
channel = "nightly-2023-07-01"
2+
channel = "nightly-2023-10-22"
33
components = ["llvm-tools", "rustc-dev"]

src/comment.rs

Lines changed: 0 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -2074,36 +2074,13 @@ fn main() {
20742074
expected_line_start: &str,
20752075
) {
20762076
let block = ItemizedBlock::new(test_input).unwrap();
2077-
<<<<<<< HEAD
2078-
assert_eq!(1, block.lines.len(), "test_input: {:?}", test_input);
2079-
assert_eq!(
2080-
expected_line, &block.lines[0],
2081-
"test_input: {:?}",
2082-
test_input
2083-
);
2084-
assert_eq!(
2085-
expected_indent, block.indent,
2086-
"test_input: {:?}",
2087-
test_input
2088-
);
2089-
assert_eq!(
2090-
expected_opener, &block.opener,
2091-
"test_input: {:?}",
2092-
test_input
2093-
);
2094-
assert_eq!(
2095-
expected_line_start, &block.line_start,
2096-
"test_input: {:?}",
2097-
test_input
2098-
=======
20992077
assert_eq!(1, block.lines.len(), "test_input: {test_input:?}");
21002078
assert_eq!(expected_line, &block.lines[0], "test_input: {test_input:?}");
21012079
assert_eq!(expected_indent, block.indent, "test_input: {test_input:?}");
21022080
assert_eq!(expected_opener, &block.opener, "test_input: {test_input:?}");
21032081
assert_eq!(
21042082
expected_line_start, &block.line_start,
21052083
"test_input: {test_input:?}"
2106-
>>>>>>> upstream/master
21072084
);
21082085
}
21092086

@@ -2155,23 +2132,15 @@ fn main() {
21552132
// https://spec.commonmark.org/0.30 says: "A start number may not be negative":
21562133
"-1. Not a list item.",
21572134
"-1 Not a list item.",
2158-
<<<<<<< HEAD
2159-
=======
21602135
// Marker without prefix are not recognized as item markers:
21612136
". Not a list item.",
21622137
") Not a list item.",
2163-
>>>>>>> upstream/master
21642138
];
21652139
for line in test_inputs.iter() {
21662140
let maybe_block = ItemizedBlock::new(line);
21672141
assert!(
21682142
maybe_block.is_none(),
2169-
<<<<<<< HEAD
2170-
"The following line shouldn't be classified as a list item: {}",
2171-
line
2172-
=======
21732143
"The following line shouldn't be classified as a list item: {line}"
2174-
>>>>>>> upstream/master
21752144
);
21762145
}
21772146
}

src/expr.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ pub(crate) fn format_expr(
132132
ast::ExprKind::Tup(ref items) => {
133133
rewrite_tuple(context, items.iter(), expr.span, shape, items.len() == 1)
134134
}
135-
ast::ExprKind::Let(ref pat, ref expr, _span) => rewrite_let(context, shape, pat, expr),
135+
ast::ExprKind::Let(ref pat, ref expr, _span, _) => rewrite_let(context, shape, pat, expr),
136136
ast::ExprKind::If(..)
137137
| ast::ExprKind::ForLoop(..)
138138
| ast::ExprKind::Loop(..)

src/pairs.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -274,7 +274,7 @@ impl<'a, 'b> PairList<'a, 'b, ast::Expr> {
274274
fn let_chain_count(&self) -> usize {
275275
self.list
276276
.iter()
277-
.filter(|(expr, _)| matches!(expr.kind, ast::ExprKind::Let(_, _, _)))
277+
.filter(|(expr, _)| matches!(expr.kind, ast::ExprKind::Let(..)))
278278
.count()
279279
}
280280

@@ -284,7 +284,7 @@ impl<'a, 'b> PairList<'a, 'b, ast::Expr> {
284284
}
285285

286286
let fist_item_is_ident = is_ident(self.list[0].0);
287-
let second_item_is_let_chain = matches!(self.list[1].0.kind, ast::ExprKind::Let(_, _, _));
287+
let second_item_is_let_chain = matches!(self.list[1].0.kind, ast::ExprKind::Let(..));
288288

289289
fist_item_is_ident && second_item_is_let_chain
290290
}

0 commit comments

Comments
 (0)