Skip to content

Commit a01e81f

Browse files
bors-ferrocene[bot]BenWiederhakeSabrinaJewsonJ-ZhengLikoka831
authored
Merge #84
84: Automated pull from upstream `master` r=Dajamante a=github-actions[bot] This PR pulls the following changes from the upstream repository: * rust-lang/rust#117585 * rust-lang/rust#117576 * rust-lang/rust#96979 * rust-lang/rust#117191 * rust-lang/rust#117179 * rust-lang/rust#117574 * rust-lang/rust#117537 * rust-lang/rust#117608 * rust-lang/rust#117596 * rust-lang/rust#117588 * rust-lang/rust#117524 * rust-lang/rust#116017 * rust-lang/rust#117504 * rust-lang/rust#117469 * rust-lang/rust#116218 * rust-lang/rust#117589 * rust-lang/rust#117581 * rust-lang/rust#117503 * rust-lang/rust#117590 * rust-lang/rust#117583 * rust-lang/rust#117570 * rust-lang/rust#117562 * rust-lang/rust#117534 * rust-lang/rust#116894 * rust-lang/rust#110340 * rust-lang/rust#113343 * rust-lang/rust#117579 * rust-lang/rust#117094 * rust-lang/rust#117566 * rust-lang/rust#117564 * rust-lang/rust#117554 * rust-lang/rust#117550 * rust-lang/rust#117343 * rust-lang/rust#115274 * rust-lang/rust#117540 * rust-lang/rust#116412 * rust-lang/rust#115333 * rust-lang/rust#117507 * rust-lang/rust#117538 * rust-lang/rust#117533 * rust-lang/rust#117523 * rust-lang/rust#117520 * rust-lang/rust#117505 * rust-lang/rust#117434 * rust-lang/rust#117535 * rust-lang/rust#117510 * rust-lang/rust#116439 * rust-lang/rust#117508 Co-authored-by: Ben Wiederhake <[email protected]> Co-authored-by: SabrinaJewson <[email protected]> Co-authored-by: J-ZhengLi <[email protected]> Co-authored-by: koka <[email protected]> Co-authored-by: bjorn3 <[email protected]> Co-authored-by: Joshua Liebow-Feeser <[email protected]> Co-authored-by: lengyijun <[email protected]> Co-authored-by: Zalathar <[email protected]> Co-authored-by: Oli Scherer <[email protected]> Co-authored-by: Philipp Krones <[email protected]> Co-authored-by: y21 <[email protected]> Co-authored-by: bors <[email protected]> Co-authored-by: bohan <[email protected]>
2 parents 6f5b979 + f83c435 commit a01e81f

File tree

895 files changed

+8357
-7312
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

895 files changed

+8357
-7312
lines changed

Cargo.lock

Lines changed: 15 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -977,6 +977,7 @@ name = "clippy"
977977
version = "0.1.75"
978978
dependencies = [
979979
"anstream",
980+
"clippy_config",
980981
"clippy_lints",
981982
"clippy_utils",
982983
"color-print",
@@ -999,6 +1000,16 @@ dependencies = [
9991000
"walkdir",
10001001
]
10011002

1003+
[[package]]
1004+
name = "clippy_config"
1005+
version = "0.1.75"
1006+
dependencies = [
1007+
"rustc-semver",
1008+
"serde",
1009+
"toml 0.7.5",
1010+
"walkdir",
1011+
]
1012+
10021013
[[package]]
10031014
name = "clippy_dev"
10041015
version = "0.0.1"
@@ -1018,6 +1029,7 @@ version = "0.1.75"
10181029
dependencies = [
10191030
"arrayvec",
10201031
"cargo_metadata 0.15.4",
1032+
"clippy_config",
10211033
"clippy_utils",
10221034
"declare_clippy_lint",
10231035
"if_chain",
@@ -1042,10 +1054,10 @@ name = "clippy_utils"
10421054
version = "0.1.75"
10431055
dependencies = [
10441056
"arrayvec",
1057+
"clippy_config",
10451058
"if_chain",
10461059
"itertools",
10471060
"rustc-semver",
1048-
"serde",
10491061
]
10501062

10511063
[[package]]
@@ -1131,9 +1143,9 @@ checksum = "55b672471b4e9f9e95499ea597ff64941a309b2cdbffcc46f2cc5e2d971fd335"
11311143

11321144
[[package]]
11331145
name = "compiler_builtins"
1134-
version = "0.1.101"
1146+
version = "0.1.103"
11351147
source = "registry+https://github.com/rust-lang/crates.io-index"
1136-
checksum = "01a6d58e9c3408138099a396a98fd0d0e6cfb25d723594d2ae48b5004513fd5b"
1148+
checksum = "a3b73c3443a5fd2438d7ba4853c64e4c8efc2404a9e28a9234cc2d5eebc6c242"
11371149
dependencies = [
11381150
"cc",
11391151
"rustc-std-workspace-core",
@@ -4537,7 +4549,6 @@ dependencies = [
45374549
"rustc_monomorphize",
45384550
"rustc_parse",
45394551
"rustc_passes",
4540-
"rustc_plugin_impl",
45414552
"rustc_privacy",
45424553
"rustc_query_system",
45434554
"rustc_resolve",
@@ -4826,7 +4837,6 @@ dependencies = [
48264837
"rustc_monomorphize",
48274838
"rustc_parse",
48284839
"rustc_passes",
4829-
"rustc_plugin_impl",
48304840
"rustc_privacy",
48314841
"rustc_query_impl",
48324842
"rustc_query_system",
@@ -5136,21 +5146,6 @@ dependencies = [
51365146
"tracing",
51375147
]
51385148

5139-
[[package]]
5140-
name = "rustc_plugin_impl"
5141-
version = "0.0.0"
5142-
dependencies = [
5143-
"libloading 0.7.4",
5144-
"rustc_ast",
5145-
"rustc_errors",
5146-
"rustc_fluent_macro",
5147-
"rustc_lint",
5148-
"rustc_macros",
5149-
"rustc_metadata",
5150-
"rustc_session",
5151-
"rustc_span",
5152-
]
5153-
51545149
[[package]]
51555150
name = "rustc_privacy"
51565151
version = "0.0.0"
@@ -6856,7 +6851,6 @@ checksum = "a156c684c91ea7d62626509bce3cb4e1d9ed5c4d978f7b4352658f96a4c26b4a"
68566851
name = "unwind"
68576852
version = "0.0.0"
68586853
dependencies = [
6859-
"cc",
68606854
"cfg-if",
68616855
"compiler_builtins",
68626856
"core",

compiler/rustc_ast/src/ast.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1548,7 +1548,10 @@ pub struct QSelf {
15481548
#[derive(Clone, Copy, PartialEq, Encodable, Decodable, Debug, HashStable_Generic)]
15491549
pub enum CaptureBy {
15501550
/// `move |x| y + x`.
1551-
Value,
1551+
Value {
1552+
/// The span of the `move` keyword.
1553+
move_kw: Span,
1554+
},
15521555
/// `move` keyword was not specified.
15531556
Ref,
15541557
}

compiler/rustc_ast/src/mut_visit.rs

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -302,6 +302,10 @@ pub trait MutVisitor: Sized {
302302
fn visit_format_args(&mut self, fmt: &mut FormatArgs) {
303303
noop_visit_format_args(fmt, self)
304304
}
305+
306+
fn visit_capture_by(&mut self, capture_by: &mut CaptureBy) {
307+
noop_visit_capture_by(capture_by, self)
308+
}
305309
}
306310

307311
/// Use a map-style function (`FnOnce(T) -> T`) to overwrite a `&mut T`. Useful
@@ -1397,7 +1401,7 @@ pub fn noop_visit_expr<T: MutVisitor>(
13971401
}
13981402
ExprKind::Closure(box Closure {
13991403
binder,
1400-
capture_clause: _,
1404+
capture_clause,
14011405
constness,
14021406
asyncness,
14031407
movability: _,
@@ -1409,6 +1413,7 @@ pub fn noop_visit_expr<T: MutVisitor>(
14091413
vis.visit_closure_binder(binder);
14101414
visit_constness(constness, vis);
14111415
vis.visit_asyncness(asyncness);
1416+
vis.visit_capture_by(capture_clause);
14121417
vis.visit_fn_decl(fn_decl);
14131418
vis.visit_expr(body);
14141419
vis.visit_span(fn_decl_span);
@@ -1562,6 +1567,15 @@ pub fn noop_visit_vis<T: MutVisitor>(visibility: &mut Visibility, vis: &mut T) {
15621567
vis.visit_span(&mut visibility.span);
15631568
}
15641569

1570+
pub fn noop_visit_capture_by<T: MutVisitor>(capture_by: &mut CaptureBy, vis: &mut T) {
1571+
match capture_by {
1572+
CaptureBy::Ref => {}
1573+
CaptureBy::Value { move_kw } => {
1574+
vis.visit_span(move_kw);
1575+
}
1576+
}
1577+
}
1578+
15651579
/// Some value for the AST node that is valid but possibly meaningless.
15661580
pub trait DummyAstNode {
15671581
fn dummy() -> Self;

compiler/rustc_ast/src/visit.rs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -251,6 +251,9 @@ pub trait Visitor<'ast>: Sized {
251251
fn visit_inline_asm_sym(&mut self, sym: &'ast InlineAsmSym) {
252252
walk_inline_asm_sym(self, sym)
253253
}
254+
fn visit_capture_by(&mut self, _capture_by: &'ast CaptureBy) {
255+
// Nothing to do
256+
}
254257
}
255258

256259
#[macro_export]
@@ -857,7 +860,7 @@ pub fn walk_expr<'a, V: Visitor<'a>>(visitor: &mut V, expression: &'a Expr) {
857860
}
858861
ExprKind::Closure(box Closure {
859862
binder,
860-
capture_clause: _,
863+
capture_clause,
861864
asyncness: _,
862865
constness: _,
863866
movability: _,
@@ -866,6 +869,7 @@ pub fn walk_expr<'a, V: Visitor<'a>>(visitor: &mut V, expression: &'a Expr) {
866869
fn_decl_span: _,
867870
fn_arg_span: _,
868871
}) => {
872+
visitor.visit_capture_by(capture_clause);
869873
visitor.visit_fn(FnKind::Closure(binder, fn_decl, body), expression.span, expression.id)
870874
}
871875
ExprKind::Block(block, opt_label) => {

compiler/rustc_ast_lowering/src/expr.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,10 @@ use rustc_hir as hir;
1515
use rustc_hir::def::Res;
1616
use rustc_hir::definitions::DefPathData;
1717
use rustc_session::errors::report_lit_error;
18-
use rustc_span::source_map::{respan, DesugaringKind, Span, Spanned};
18+
use rustc_span::source_map::{respan, Spanned};
1919
use rustc_span::symbol::{sym, Ident, Symbol};
2020
use rustc_span::DUMMY_SP;
21+
use rustc_span::{DesugaringKind, Span};
2122
use thin_vec::{thin_vec, ThinVec};
2223

2324
impl<'hir> LoweringContext<'_, 'hir> {

compiler/rustc_ast_lowering/src/item.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,8 @@ use rustc_hir::PredicateOrigin;
1616
use rustc_index::{Idx, IndexSlice, IndexVec};
1717
use rustc_middle::ty::{ResolverAstLowering, TyCtxt};
1818
use rustc_span::edit_distance::find_best_match_for_name;
19-
use rustc_span::source_map::DesugaringKind;
2019
use rustc_span::symbol::{kw, sym, Ident};
21-
use rustc_span::{Span, Symbol};
20+
use rustc_span::{DesugaringKind, Span, Symbol};
2221
use rustc_target::spec::abi;
2322
use smallvec::{smallvec, SmallVec};
2423
use thin_vec::ThinVec;
@@ -1202,7 +1201,7 @@ impl<'hir> LoweringContext<'_, 'hir> {
12021201
}
12031202

12041203
let async_expr = this.make_async_expr(
1205-
CaptureBy::Value,
1204+
CaptureBy::Value { move_kw: rustc_span::DUMMY_SP },
12061205
closure_id,
12071206
None,
12081207
body.span,

compiler/rustc_ast_lowering/src/lib.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,9 +71,8 @@ use rustc_middle::{
7171
};
7272
use rustc_session::parse::{add_feature_diagnostics, feature_err};
7373
use rustc_span::hygiene::MacroKind;
74-
use rustc_span::source_map::DesugaringKind;
7574
use rustc_span::symbol::{kw, sym, Ident, Symbol};
76-
use rustc_span::{Span, DUMMY_SP};
75+
use rustc_span::{DesugaringKind, Span, DUMMY_SP};
7776
use smallvec::SmallVec;
7877
use std::collections::hash_map::Entry;
7978
use thin_vec::ThinVec;

compiler/rustc_ast_pretty/src/pprust/state/expr.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -673,7 +673,7 @@ impl<'a> State<'a> {
673673

674674
fn print_capture_clause(&mut self, capture_clause: ast::CaptureBy) {
675675
match capture_clause {
676-
ast::CaptureBy::Value => self.word_space("move"),
676+
ast::CaptureBy::Value { .. } => self.word_space("move"),
677677
ast::CaptureBy::Ref => {}
678678
}
679679
}

compiler/rustc_borrowck/src/diagnostics/mutability_errors.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,8 @@ use rustc_middle::{
99
hir::place::PlaceBase,
1010
mir::{self, BindingForm, Local, LocalDecl, LocalInfo, LocalKind, Location},
1111
};
12-
use rustc_span::source_map::DesugaringKind;
1312
use rustc_span::symbol::{kw, Symbol};
14-
use rustc_span::{sym, BytePos, Span};
13+
use rustc_span::{sym, BytePos, DesugaringKind, Span};
1514
use rustc_target::abi::FieldIdx;
1615

1716
use crate::diagnostics::BorrowedContentSource;

compiler/rustc_borrowck/src/diagnostics/var_name.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ use crate::Upvar;
66
use rustc_index::IndexSlice;
77
use rustc_middle::mir::{Body, Local};
88
use rustc_middle::ty::{RegionVid, TyCtxt};
9-
use rustc_span::source_map::Span;
109
use rustc_span::symbol::Symbol;
10+
use rustc_span::Span;
1111

1212
impl<'tcx> RegionInferenceContext<'tcx> {
1313
pub(crate) fn get_var_name_and_span_for_region(

compiler/rustc_builtin_macros/src/deriving/generic/ty.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,10 @@ pub use Ty::*;
66
use rustc_ast::ptr::P;
77
use rustc_ast::{self as ast, Expr, GenericArg, GenericParamKind, Generics, SelfKind};
88
use rustc_expand::base::ExtCtxt;
9-
use rustc_span::source_map::{respan, DUMMY_SP};
9+
use rustc_span::source_map::respan;
1010
use rustc_span::symbol::{kw, Ident, Symbol};
1111
use rustc_span::Span;
12+
use rustc_span::DUMMY_SP;
1213
use thin_vec::ThinVec;
1314

1415
/// A path, e.g., `::std::option::Option::<i32>` (global). Has support

compiler/rustc_codegen_cranelift/scripts/test_rustc_tests.sh

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,6 @@ rm -r tests/run-make/split-debuginfo # same
6868
rm -r tests/run-make/symbols-include-type-name # --emit=asm not supported
6969
rm -r tests/run-make/target-specs # i686 not supported by Cranelift
7070
rm -r tests/run-make/mismatching-target-triples # same
71-
rm -r tests/run-make/use-extern-for-plugins # same
7271
rm tests/ui/asm/x86_64/issue-82869.rs # vector regs in inline asm not yet supported
7372
rm tests/ui/asm/x86_64/issue-96797.rs # const and sym inline asm operands don't work entirely correctly
7473

compiler/rustc_codegen_llvm/src/consts.rs

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -374,15 +374,7 @@ impl<'ll> StaticMethods for CodegenCx<'ll, '_> {
374374

375375
let g = self.get_static(def_id);
376376

377-
// boolean SSA values are i1, but they have to be stored in i8 slots,
378-
// otherwise some LLVM optimization passes don't work as expected
379-
let mut val_llty = self.val_ty(v);
380-
let v = if val_llty == self.type_i1() {
381-
val_llty = self.type_i8();
382-
llvm::LLVMConstZExt(v, val_llty)
383-
} else {
384-
v
385-
};
377+
let val_llty = self.val_ty(v);
386378

387379
let instance = Instance::mono(self.tcx, def_id);
388380
let ty = instance.ty(self.tcx, ty::ParamEnv::reveal_all());

compiler/rustc_codegen_llvm/src/context.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,8 @@ use rustc_middle::{bug, span_bug};
2626
use rustc_session::config::{BranchProtection, CFGuard, CFProtection};
2727
use rustc_session::config::{CrateType, DebugInfo, PAuthKey, PacRet};
2828
use rustc_session::Session;
29-
use rustc_span::source_map::Span;
3029
use rustc_span::source_map::Spanned;
30+
use rustc_span::Span;
3131
use rustc_target::abi::{
3232
call::FnAbi, HasDataLayout, PointeeInfo, Size, TargetDataLayout, VariantIdx,
3333
};

compiler/rustc_codegen_llvm/src/llvm/ffi.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -969,7 +969,6 @@ extern "C" {
969969
ConstantIndices: *const &'a Value,
970970
NumIndices: c_uint,
971971
) -> &'a Value;
972-
pub fn LLVMConstZExt<'a>(ConstantVal: &'a Value, ToType: &'a Type) -> &'a Value;
973972
pub fn LLVMConstPtrToInt<'a>(ConstantVal: &'a Value, ToType: &'a Type) -> &'a Value;
974973
pub fn LLVMConstIntToPtr<'a>(ConstantVal: &'a Value, ToType: &'a Type) -> &'a Value;
975974
pub fn LLVMConstBitCast<'a>(ConstantVal: &'a Value, ToType: &'a Type) -> &'a Value;

compiler/rustc_codegen_ssa/src/mir/block.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,7 @@ use rustc_middle::ty::layout::{HasTyCtxt, LayoutOf, ValidityRequirement};
1717
use rustc_middle::ty::print::{with_no_trimmed_paths, with_no_visible_paths};
1818
use rustc_middle::ty::{self, Instance, Ty};
1919
use rustc_session::config::OptLevel;
20-
use rustc_span::source_map::Span;
21-
use rustc_span::{sym, Symbol};
20+
use rustc_span::{sym, Span, Symbol};
2221
use rustc_target::abi::call::{ArgAbi, FnAbi, PassMode, Reg};
2322
use rustc_target::abi::{self, HasDataLayout, WrappingRange};
2423
use rustc_target::spec::abi::Abi;

compiler/rustc_codegen_ssa/src/mir/rvalue.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ use rustc_middle::ty::cast::{CastTy, IntTy};
1313
use rustc_middle::ty::layout::{HasTyCtxt, LayoutOf, TyAndLayout};
1414
use rustc_middle::ty::{self, adjustment::PointerCoercion, Instance, Ty, TyCtxt};
1515
use rustc_session::config::OptLevel;
16-
use rustc_span::source_map::{Span, DUMMY_SP};
16+
use rustc_span::{Span, DUMMY_SP};
1717
use rustc_target::abi::{self, FIRST_VARIANT};
1818

1919
impl<'a, 'tcx, Bx: BuilderMethods<'a, 'tcx>> FunctionCx<'a, 'tcx, Bx> {

compiler/rustc_const_eval/src/const_eval/eval_queries.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ use rustc_middle::traits::Reveal;
1010
use rustc_middle::ty::layout::LayoutOf;
1111
use rustc_middle::ty::print::with_no_trimmed_paths;
1212
use rustc_middle::ty::{self, TyCtxt};
13-
use rustc_span::source_map::Span;
13+
use rustc_span::Span;
1414
use rustc_target::abi::{self, Abi};
1515

1616
use super::{CanAccessStatics, CompileTimeEvalContext, CompileTimeInterpreter};

compiler/rustc_const_eval/src/const_eval/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ use rustc_middle::mir;
66
use rustc_middle::mir::interpret::{EvalToValTreeResult, GlobalId};
77
use rustc_middle::query::TyCtxtAt;
88
use rustc_middle::ty::{self, Ty, TyCtxt};
9-
use rustc_span::source_map::DUMMY_SP;
9+
use rustc_span::DUMMY_SP;
1010

1111
mod error;
1212
mod eval_queries;

compiler/rustc_const_eval/src/const_eval/valtrees.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ use crate::interpret::{
1010
use rustc_middle::mir;
1111
use rustc_middle::ty::layout::{LayoutCx, LayoutOf, TyAndLayout};
1212
use rustc_middle::ty::{self, ScalarInt, Ty, TyCtxt};
13-
use rustc_span::source_map::DUMMY_SP;
13+
use rustc_span::DUMMY_SP;
1414
use rustc_target::abi::VariantIdx;
1515

1616
#[instrument(skip(ecx), level = "debug")]

compiler/rustc_data_structures/src/sync/parallel.rs

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -77,12 +77,12 @@ mod disabled {
7777
})
7878
}
7979

80-
pub fn try_par_for_each_in<T: IntoIterator, E: Copy>(
80+
pub fn try_par_for_each_in<T: IntoIterator, E>(
8181
t: T,
8282
mut for_each: impl FnMut(T::Item) -> Result<(), E>,
8383
) -> Result<(), E> {
8484
parallel_guard(|guard| {
85-
t.into_iter().fold(Ok(()), |ret, i| guard.run(|| for_each(i)).unwrap_or(ret).and(ret))
85+
t.into_iter().filter_map(|i| guard.run(|| for_each(i))).fold(Ok(()), Result::and)
8686
})
8787
}
8888

@@ -178,7 +178,7 @@ mod enabled {
178178

179179
pub fn try_par_for_each_in<
180180
T: IntoIterator + IntoParallelIterator<Item = <T as IntoIterator>::Item>,
181-
E: Copy + Send,
181+
E: Send,
182182
>(
183183
t: T,
184184
for_each: impl Fn(<T as IntoIterator>::Item) -> Result<(), E> + DynSync + DynSend,
@@ -187,11 +187,10 @@ mod enabled {
187187
if mode::is_dyn_thread_safe() {
188188
let for_each = FromDyn::from(for_each);
189189
t.into_par_iter()
190-
.fold_with(Ok(()), |ret, i| guard.run(|| for_each(i)).unwrap_or(ret).and(ret))
191-
.reduce(|| Ok(()), |a, b| a.and(b))
190+
.filter_map(|i| guard.run(|| for_each(i)))
191+
.reduce(|| Ok(()), Result::and)
192192
} else {
193-
t.into_iter()
194-
.fold(Ok(()), |ret, i| guard.run(|| for_each(i)).unwrap_or(ret).and(ret))
193+
t.into_iter().filter_map(|i| guard.run(|| for_each(i))).fold(Ok(()), Result::and)
195194
}
196195
})
197196
}

0 commit comments

Comments
 (0)