Skip to content

Commit 2c0d666

Browse files
authored
Unrolled build for #143073
Rollup merge of #143073 - yotamofek:pr/fix-let-chains-fixmes, r=compiler-errors Fix some fixmes that were waiting for let chains Was inspired by looking at #143066 and spotting two fixmes that were missed, so... r? `@compiler-errors` 😅 Yay, let chains!
2 parents 513999b + 174cb47 commit 2c0d666

File tree

2 files changed

+11
-12
lines changed

2 files changed

+11
-12
lines changed

compiler/rustc_next_trait_solver/src/solve/assembly/structural_traits.rs

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -326,11 +326,10 @@ pub(in crate::solve) fn extract_tupled_inputs_and_output_from_callable<I: Intern
326326
let kind_ty = args.kind_ty();
327327
let sig = args.coroutine_closure_sig().skip_binder();
328328

329-
// FIXME: let_chains
330-
let kind = kind_ty.to_opt_closure_kind();
331-
let coroutine_ty = if kind.is_some() && !args.tupled_upvars_ty().is_ty_var() {
332-
let closure_kind = kind.unwrap();
333-
if !closure_kind.extends(goal_kind) {
329+
let coroutine_ty = if let Some(kind) = kind_ty.to_opt_closure_kind()
330+
&& !args.tupled_upvars_ty().is_ty_var()
331+
{
332+
if !kind.extends(goal_kind) {
334333
return Err(NoSolution);
335334
}
336335

@@ -435,10 +434,10 @@ pub(in crate::solve) fn extract_tupled_inputs_and_output_from_async_callable<I:
435434
let sig = args.coroutine_closure_sig().skip_binder();
436435
let mut nested = vec![];
437436

438-
// FIXME: let_chains
439-
let kind = kind_ty.to_opt_closure_kind();
440-
let coroutine_ty = if kind.is_some() && !args.tupled_upvars_ty().is_ty_var() {
441-
if !kind.unwrap().extends(goal_kind) {
437+
let coroutine_ty = if let Some(kind) = kind_ty.to_opt_closure_kind()
438+
&& !args.tupled_upvars_ty().is_ty_var()
439+
{
440+
if !kind.extends(goal_kind) {
442441
return Err(NoSolution);
443442
}
444443

src/tools/compiletest/src/executor.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,9 @@ pub(crate) fn run_tests(config: &Config, tests: Vec<CollectedTest>) -> bool {
4040
// In that case, the tests will effectively be run serially anyway.
4141
loop {
4242
// Spawn new test threads, up to the concurrency limit.
43-
// FIXME(let_chains): Use a let-chain here when stable in bootstrap.
44-
'spawn: while running_tests.len() < concurrency {
45-
let Some((id, test)) = fresh_tests.next() else { break 'spawn };
43+
while running_tests.len() < concurrency
44+
&& let Some((id, test)) = fresh_tests.next()
45+
{
4646
listener.test_started(test);
4747
deadline_queue.push(id, test);
4848
let join_handle = spawn_test_thread(id, test, completion_tx.clone());

0 commit comments

Comments
 (0)