Skip to content

Commit b18e1aa

Browse files
authored
Rollup merge of rust-lang#131542 - lcnr:new-solver-fixmes, r=compiler-errors
next-solver: remove outdated FIXMEs r? `@compiler-errors`
2 parents 7f79c1e + 5fd7be9 commit b18e1aa

File tree

6 files changed

+6
-15
lines changed

6 files changed

+6
-15
lines changed

compiler/rustc_next_trait_solver/src/solve/eval_ctxt/canonical.rs

-1
Original file line numberDiff line numberDiff line change
@@ -444,7 +444,6 @@ where
444444
for &arg in &state.value.var_values.var_values.as_slice()
445445
[orig_values.len()..state.value.var_values.len()]
446446
{
447-
// FIXME: This is so ugly.
448447
let unconstrained = delegate.fresh_var_for_kind_with_span(arg, span);
449448
orig_values.push(unconstrained);
450449
}

compiler/rustc_next_trait_solver/src/solve/eval_ctxt/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,6 @@ where
9292
#[derive_where(Clone, Debug, Default; I: Interner)]
9393
#[derive(TypeVisitable_Generic, TypeFoldable_Generic, Lift_Generic)]
9494
#[cfg_attr(feature = "nightly", derive(TyDecodable, TyEncodable, HashStable_NoContext))]
95-
// FIXME: This can be made crate-private once `EvalCtxt` also lives in this crate.
9695
struct NestedGoals<I: Interner> {
9796
/// These normalizes-to goals are treated specially during the evaluation
9897
/// loop. In each iteration we take the RHS of the projection, replace it with
@@ -421,6 +420,7 @@ where
421420
let (normalization_nested_goals, certainty) =
422421
self.instantiate_and_apply_query_response(goal.param_env, orig_values, response);
423422
self.inspect.goal_evaluation(goal_evaluation);
423+
424424
// FIXME: We previously had an assert here that checked that recomputing
425425
// a goal after applying its constraints did not change its response.
426426
//

compiler/rustc_next_trait_solver/src/solve/mod.rs

-3
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,6 @@
1010
//!
1111
//! For a high-level overview of how this solver works, check out the relevant
1212
//! section of the rustc-dev-guide.
13-
//!
14-
//! FIXME(@lcnr): Write that section. If you read this before then ask me
15-
//! about it on zulip.
1613
1714
mod alias_relate;
1815
mod assembly;

compiler/rustc_next_trait_solver/src/solve/normalizes_to/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -899,7 +899,7 @@ where
899899
for ty in types.iter() {
900900
// We can't find the intersection if the types used are generic.
901901
//
902-
// FIXME(effects) do we want to look at where clauses to get some
902+
// FIXME(effects): do we want to look at where clauses to get some
903903
// clue for the case where generic types are being used?
904904
let Some(kind) = ty::EffectKind::try_from_ty(cx, ty) else {
905905
return Err(NoSolution);

compiler/rustc_next_trait_solver/src/solve/trait_goals.rs

+2-9
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,6 @@ where
108108
ecx: &mut EvalCtxt<'_, D>,
109109
_guar: I::ErrorGuaranteed,
110110
) -> Result<Candidate<I>, NoSolution> {
111-
// FIXME: don't need to enter a probe here.
112111
ecx.probe_builtin_trait_candidate(BuiltinImplSource::Misc)
113112
.enter(|ecx| ecx.evaluate_added_goals_and_make_canonical_response(Certainty::Yes))
114113
}
@@ -463,7 +462,6 @@ where
463462
// Async coroutine unconditionally implement `Future`
464463
// Technically, we need to check that the future output type is Sized,
465464
// but that's already proven by the coroutine being WF.
466-
// FIXME: use `consider_implied`
467465
ecx.probe_builtin_trait_candidate(BuiltinImplSource::Misc)
468466
.enter(|ecx| ecx.evaluate_added_goals_and_make_canonical_response(Certainty::Yes))
469467
}
@@ -489,7 +487,6 @@ where
489487
// Gen coroutines unconditionally implement `Iterator`
490488
// Technically, we need to check that the iterator output type is Sized,
491489
// but that's already proven by the coroutines being WF.
492-
// FIXME: use `consider_implied`
493490
ecx.probe_builtin_trait_candidate(BuiltinImplSource::Misc)
494491
.enter(|ecx| ecx.evaluate_added_goals_and_make_canonical_response(Certainty::Yes))
495492
}
@@ -512,8 +509,7 @@ where
512509
return Err(NoSolution);
513510
}
514511

515-
// Gen coroutines unconditionally implement `FusedIterator`
516-
// FIXME: use `consider_implied`
512+
// Gen coroutines unconditionally implement `FusedIterator`.
517513
ecx.probe_builtin_trait_candidate(BuiltinImplSource::Misc)
518514
.enter(|ecx| ecx.evaluate_added_goals_and_make_canonical_response(Certainty::Yes))
519515
}
@@ -539,7 +535,6 @@ where
539535
// Gen coroutines unconditionally implement `Iterator`
540536
// Technically, we need to check that the iterator output type is Sized,
541537
// but that's already proven by the coroutines being WF.
542-
// FIXME: use `consider_implied`
543538
ecx.probe_builtin_trait_candidate(BuiltinImplSource::Misc)
544539
.enter(|ecx| ecx.evaluate_added_goals_and_make_canonical_response(Certainty::Yes))
545540
}
@@ -610,7 +605,7 @@ where
610605
return Err(NoSolution);
611606
}
612607

613-
// FIXME(-Znext-solver): Implement this when we get const working in the new solver
608+
// FIXME(effects): Implement this when we get const working in the new solver
614609

615610
// `Destruct` is automatically implemented for every type in
616611
// non-const environments.
@@ -631,8 +626,6 @@ where
631626
return Err(NoSolution);
632627
}
633628

634-
// FIXME: This actually should destructure the `Result` we get from transmutability and
635-
// register candidates. We probably need to register >1 since we may have an OR of ANDs.
636629
ecx.probe_builtin_trait_candidate(BuiltinImplSource::Misc).enter(|ecx| {
637630
let certainty = ecx.is_transmutable(
638631
goal.param_env,

compiler/rustc_trait_selection/src/solve/delegate.rs

+2
Original file line numberDiff line numberDiff line change
@@ -223,6 +223,8 @@ impl<'tcx> rustc_next_trait_solver::delegate::SolverDelegate for SolverDelegate<
223223
if eligible { Ok(Some(node_item.item.def_id)) } else { Ok(None) }
224224
}
225225

226+
// FIXME: This actually should destructure the `Result` we get from transmutability and
227+
// register candidates. We probably need to register >1 since we may have an OR of ANDs.
226228
fn is_transmutable(
227229
&self,
228230
param_env: ty::ParamEnv<'tcx>,

0 commit comments

Comments
 (0)