mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-25 08:13:41 +00:00
simplify merging of two vecs
This commit is contained in:
parent
27d8a57713
commit
6892fcd690
@ -979,7 +979,7 @@ impl ConstructorSet {
|
||||
&& !(pcx.is_top_level && matches!(self, Self::NoConstructors))
|
||||
{
|
||||
// Treat all missing constructors as nonempty.
|
||||
missing.extend(missing_empty.drain(..));
|
||||
missing.append(&mut missing_empty);
|
||||
}
|
||||
|
||||
SplitConstructorSet { present, missing, missing_empty }
|
||||
|
@ -2178,7 +2178,7 @@ impl<'a: 'ast, 'ast, 'tcx> LateResolutionVisitor<'a, '_, 'ast, 'tcx> {
|
||||
let (span, text) = match path.segments.first() {
|
||||
Some(seg) if let Some(name) = seg.ident.as_str().strip_prefix("let") => {
|
||||
// a special case for #117894
|
||||
let name = name.strip_prefix("_").unwrap_or(name);
|
||||
let name = name.strip_prefix('_').unwrap_or(name);
|
||||
(ident_span, format!("let {name}"))
|
||||
}
|
||||
_ => (ident_span.shrink_to_lo(), "let ".to_string()),
|
||||
|
Loading…
Reference in New Issue
Block a user