Skip to content

Commit 6b96103

Browse files
Rename the FIXMEs, remove a few that dont matter anymore
1 parent 0b5ddf3 commit 6b96103

File tree

47 files changed

+58
-68
lines changed

Some content is hidden

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

47 files changed

+58
-68
lines changed

compiler/rustc_ast_passes/src/errors.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -594,8 +594,8 @@ pub(crate) struct ConstBoundTraitObject {
594594
pub span: Span,
595595
}
596596

597-
// FIXME(effects): Consider making the note/reason the message of the diagnostic.
598-
// FIXME(effects): Provide structured suggestions (e.g., add `const` / `#[const_trait]` here).
597+
// FIXME(const_trait_impl): Consider making the note/reason the message of the diagnostic.
598+
// FIXME(const_trait_impl): Provide structured suggestions (e.g., add `const` / `#[const_trait]` here).
599599
#[derive(Diagnostic)]
600600
#[diag(ast_passes_tilde_const_disallowed)]
601601
pub(crate) struct TildeConstDisallowed {

compiler/rustc_const_eval/src/check_consts/check.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -657,7 +657,8 @@ impl<'tcx> Visitor<'tcx> for Checker<'_, 'tcx> {
657657
// typeck ensures the conditions for calling a const trait method are met,
658658
// so we only error if the trait isn't const. We try to resolve the trait
659659
// into the concrete method, and uses that for const stability checks.
660-
// FIXME(effects) we might consider moving const stability checks to typeck as well.
660+
// FIXME(const_trait_impl) we might consider moving const stability checks
661+
// to typeck as well.
661662
if tcx.features().const_trait_impl() && trait_is_const {
662663
// This skips the check below that ensures we only call `const fn`.
663664
is_trait = true;

compiler/rustc_const_eval/src/check_consts/ops.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ impl<'tcx> NonConstOp<'tcx> for FnCallNonConst<'tcx> {
120120
let implsrc = selcx.select(&obligation);
121121

122122
if let Ok(Some(ImplSource::UserDefined(data))) = implsrc {
123-
// FIXME(effects) revisit this
123+
// FIXME(const_trait_impl) revisit this
124124
if !tcx.is_const_trait_impl(data.impl_def_id) {
125125
let span = tcx.def_span(data.impl_def_id);
126126
err.subdiagnostic(errors::NonConstImplNote { span });

compiler/rustc_const_eval/src/check_consts/qualifs.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,7 @@ impl Qualif for NeedsNonConstDrop {
192192
return false;
193193
}
194194

195-
// FIXME(effects): Reimplement const drop checking.
195+
// FIXME(const_trait_impl): Reimplement const drop checking.
196196
NeedsDrop::in_any_value_of_ty(cx, ty)
197197
}
198198

compiler/rustc_const_eval/src/const_eval/machine.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -431,7 +431,7 @@ impl<'tcx> interpret::Machine<'tcx> for CompileTimeMachine<'tcx> {
431431
// sensitive check here. But we can at least rule out functions that are not const at
432432
// all. That said, we have to allow calling functions inside a trait marked with
433433
// #[const_trait]. These *are* const-checked!
434-
// FIXME(effects): why does `is_const_fn` not classify them as const?
434+
// FIXME(const_trait_impl): why does `is_const_fn` not classify them as const?
435435
if (!ecx.tcx.is_const_fn(def) && !ecx.tcx.is_const_default_method(def))
436436
|| ecx.tcx.has_attr(def, sym::rustc_do_not_const_check)
437437
{

compiler/rustc_hir_analysis/src/check/compare_impl_item.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,6 @@ fn compare_method_predicate_entailment<'tcx>(
205205
trait_m_predicates.instantiate_own(tcx, trait_to_impl_args).map(|(predicate, _)| predicate),
206206
);
207207

208-
// FIXME(effects): This should be replaced with a more dedicated method.
209208
let is_conditionally_const = tcx.is_conditionally_const(impl_def_id);
210209
if is_conditionally_const {
211210
// Augment the hybrid param-env with the const conditions

compiler/rustc_hir_analysis/src/hir_ty_lowering/mod.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -563,7 +563,6 @@ impl<'tcx> dyn HirTyLowerer<'tcx> + '_ {
563563
if let Err(guar) = ty.error_reported() {
564564
return ty::Const::new_error(tcx, guar).into();
565565
}
566-
// FIXME(effects) see if we should special case effect params here
567566
if !infer_args && has_default {
568567
tcx.const_param_default(param.def_id)
569568
.instantiate(tcx, preceding_args)

compiler/rustc_hir_analysis/src/impl_wf_check/min_specialization.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -459,7 +459,7 @@ fn trait_predicates_eq<'tcx>(
459459
predicate1: ty::Predicate<'tcx>,
460460
predicate2: ty::Predicate<'tcx>,
461461
) -> bool {
462-
// FIXME(effects)
462+
// FIXME(const_trait_impl)
463463
predicate1 == predicate2
464464
}
465465

compiler/rustc_hir_typeck/src/callee.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -461,7 +461,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
461461
}
462462
(fn_sig, Some(def_id))
463463
}
464-
// FIXME(effects): these arms should error because we can't enforce them
464+
// FIXME(const_trait_impl): these arms should error because we can't enforce them
465465
ty::FnPtr(sig_tys, hdr) => (sig_tys.with(hdr), None),
466466
_ => {
467467
for arg in arg_exprs {
@@ -843,7 +843,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
843843
callee_did: DefId,
844844
callee_args: GenericArgsRef<'tcx>,
845845
) {
846-
// FIXME(effects): We should be enforcing these effects unconditionally.
846+
// FIXME(const_trait_impl): We should be enforcing these effects unconditionally.
847847
// This can be done as soon as we convert the standard library back to
848848
// using const traits, since if we were to enforce these conditions now,
849849
// we'd fail on basically every builtin trait call (i.e. `1 + 2`).
@@ -864,11 +864,11 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
864864
None => return,
865865
};
866866

867-
// FIXME(effects): Should this be `is_const_fn_raw`? It depends on if we move
867+
// FIXME(const_trait_impl): Should this be `is_const_fn_raw`? It depends on if we move
868868
// const stability checking here too, I guess.
869869
if self.tcx.is_conditionally_const(callee_did) {
870870
let q = self.tcx.const_conditions(callee_did);
871-
// FIXME(effects): Use this span with a better cause code.
871+
// FIXME(const_trait_impl): Use this span with a better cause code.
872872
for (cond, _) in q.instantiate(self.tcx, callee_args) {
873873
self.register_predicate(Obligation::new(
874874
self.tcx,
@@ -878,7 +878,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
878878
));
879879
}
880880
} else {
881-
// FIXME(effects): This should eventually be caught here.
881+
// FIXME(const_trait_impl): This should eventually be caught here.
882882
// For now, though, we defer some const checking to MIR.
883883
}
884884
}

compiler/rustc_middle/src/ty/context.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3125,7 +3125,6 @@ impl<'tcx> TyCtxt<'tcx> {
31253125
}
31263126
}
31273127

3128-
// FIXME(effects): Please remove this. It's a footgun.
31293128
/// Whether the trait impl is marked const. This does not consider stability or feature gates.
31303129
pub fn is_const_trait_impl(self, def_id: DefId) -> bool {
31313130
self.def_kind(def_id) == DefKind::Impl { of_trait: true }

0 commit comments

Comments
 (0)