Skip to content

Commit 870a5d9

Browse files
authored
Rollup merge of #119231 - aDotInTheVoid:PatKind-struct-bool-docs, r=compiler-errors
Clairify `ast::PatKind::Struct` presese of `..` by using an enum instead of a bool The bool is mainly used for when a `..` is present, but it is also set on recovery to avoid errors. The doc comment not describes both of these cases. See https://github.com/rust-lang/rust/blob/cee794ee98d49b45a55ba225680d98e0c4672736/compiler/rustc_parse/src/parser/pat.rs#L890-L897 for the only place this is constructed. r? ``@compiler-errors``
2 parents 5a9c25c + d72771f commit 870a5d9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

clippy_lints/src/unnested_or_patterns.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -293,7 +293,7 @@ fn extend_with_struct_pat(
293293
qself1: &Option<P<ast::QSelf>>,
294294
path1: &ast::Path,
295295
fps1: &mut [ast::PatField],
296-
rest1: bool,
296+
rest1: ast::PatFieldsRest,
297297
start: usize,
298298
alternatives: &mut ThinVec<P<Pat>>,
299299
) -> bool {

0 commit comments

Comments
 (0)