Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions compiler/rustc_ast_lowering/src/diagnostics.rs
Original file line number Diff line number Diff line change
Expand Up @@ -365,6 +365,7 @@ pub(crate) struct MatchArmWithNoBody {
pub span: Span,
#[suggestion(
"add a body after the pattern",
// ignore-tidy-todo
code = " => todo!(),",
applicability = "has-placeholders"
)]
Expand Down
1 change: 1 addition & 0 deletions compiler/rustc_ast_passes/src/diagnostics.rs
Original file line number Diff line number Diff line change
Expand Up @@ -978,6 +978,7 @@ pub(crate) struct MatchArmWithNoBody {
// resulting code to be correct.
#[suggestion(
"add a body after the pattern",
// ignore-tidy-todo
code = " => {{ todo!() }}",
Comment thread
jdonszelmann marked this conversation as resolved.
applicability = "has-placeholders",
style = "verbose"
Expand Down
2 changes: 1 addition & 1 deletion compiler/rustc_borrowck/src/diagnostics/conflict_errors.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// ignore-tidy-filelength
// ignore-tidy-file-filelength

use std::iter;
use std::ops::ControlFlow;
Expand Down
2 changes: 1 addition & 1 deletion compiler/rustc_borrowck/src/places_conflict.rs
Original file line number Diff line number Diff line change
Expand Up @@ -520,7 +520,7 @@ fn place_projection_conflict<'tcx>(
),

(ProjectionElem::UnwrapUnsafeBinder(_), _) => {
todo!()
unimplemented!()
}
}
}
2 changes: 1 addition & 1 deletion compiler/rustc_borrowck/src/universal_regions.rs
Original file line number Diff line number Diff line change
Expand Up @@ -398,7 +398,7 @@ impl<'tcx> UniversalRegions<'tcx> {
});
}
DefiningTy::CoroutineClosure(..) => {
todo!()
unimplemented!()
}
DefiningTy::Coroutine(def_id, args) => {
let v = with_no_trimmed_paths!(
Expand Down
2 changes: 1 addition & 1 deletion compiler/rustc_builtin_macros/src/autodiff.rs
Original file line number Diff line number Diff line change
Expand Up @@ -565,7 +565,7 @@ mod llvm_enzyme {
.iter()
.map(|arg| match arg.pat.kind {
PatKind::Ident(_, ident, _) => ecx.expr_path(ecx.path_ident(span, ident)),
_ => todo!(),
_ => unimplemented!(),
})
.collect::<ThinVec<_>>(),
);
Expand Down
2 changes: 1 addition & 1 deletion compiler/rustc_const_eval/src/interpret/validity.rs
Original file line number Diff line number Diff line change
Expand Up @@ -947,7 +947,7 @@ impl<'rt, 'tcx, M: Machine<'tcx>> ValidityVisitor<'rt, 'tcx, M> {
// Nothing to check.
interp_ok(true)
}
ty::UnsafeBinder(_) => todo!("FIXME(unsafe_binder)"),
ty::UnsafeBinder(_) => unimplemented!("FIXME(unsafe_binder)"),
// The above should be all the primitive types. The rest is compound, we
// check them by visiting their fields/variants.
ty::Adt(..)
Expand Down
2 changes: 1 addition & 1 deletion compiler/rustc_expand/src/expand.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1941,7 +1941,7 @@ impl InvocationCollectorNode for ast::Pat {
}
}
fn as_target(&self) -> Target {
todo!();
unimplemented!();
}
}

Expand Down
2 changes: 1 addition & 1 deletion compiler/rustc_hir/src/hir.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// ignore-tidy-filelength
// ignore-tidy-file-filelength
use std::borrow::Cow;
use std::fmt;
use std::ops::Not;
Expand Down
1 change: 1 addition & 0 deletions compiler/rustc_hir_analysis/src/check/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -509,6 +509,7 @@ fn fn_sig_suggestion<'tcx>(
// lifetimes between the `impl` and the `trait`, but this should be good enough to
// fill in a significant portion of the missing code, and other subsequent
// suggestions can help the user fix the code.
// ignore-tidy-todo
format!("{safety}{asyncness}fn {ident}{generics}({args}){output}{where_clauses} {{ todo!() }}")
}

Expand Down
2 changes: 1 addition & 1 deletion compiler/rustc_hir_analysis/src/coherence/builtin.rs
Original file line number Diff line number Diff line change
Expand Up @@ -627,7 +627,7 @@ pub(crate) fn coerce_shared_info<'tcx>(
span,
Unnormalized::new_wip(trait_ref.args.type_at(1)),
) else {
todo!("something went wrong with structurally_normalize_ty");
panic!("something went wrong with structurally_normalize_ty");
};

let param_env = tcx.param_env(impl_did);
Expand Down
2 changes: 1 addition & 1 deletion compiler/rustc_hir_typeck/src/cast.rs
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
Some(&f) => self.pointer_kind(f, span)?,
},

ty::UnsafeBinder(_) => todo!("FIXME(unsafe_binder)"),
ty::UnsafeBinder(_) => unimplemented!("FIXME(unsafe_binder)"),

// Pointers to foreign types are thin, despite being unsized
ty::Foreign(..) => Some(PointerKind::Thin),
Expand Down
2 changes: 1 addition & 1 deletion compiler/rustc_hir_typeck/src/closure.rs
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
(bound_sig.skip_binder().output(), tcx.types.unit)
}
hir::CoroutineDesugaring::AsyncGen => {
todo!("`async gen` closures not supported yet")
unimplemented!("`async gen` closures not supported yet")
}
};
// Compute all of the variables that will be used to populate the coroutine.
Expand Down
2 changes: 1 addition & 1 deletion compiler/rustc_hir_typeck/src/expr.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// ignore-tidy-filelength
// ignore-tidy-file-filelength
// FIXME: we should move the field error reporting code somewhere else.

//! Type checking expressions.
Expand Down
2 changes: 1 addition & 1 deletion compiler/rustc_hir_typeck/src/fn_ctxt/suggestions.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// ignore-tidy-filelength
// ignore-tidy-file-filelength
use core::cmp::min;
use core::iter;

Expand Down
2 changes: 1 addition & 1 deletion compiler/rustc_hir_typeck/src/method/suggest.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
//! Give useful errors and suggestions to users when an item can't be
//! found or is otherwise invalid.

// ignore-tidy-filelength
// ignore-tidy-file-filelength

use core::ops::ControlFlow;
use std::borrow::Cow;
Expand Down
2 changes: 1 addition & 1 deletion compiler/rustc_lint/src/lints.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// ignore-tidy-filelength
// ignore-tidy-file-filelength

use std::num::NonZero;

Expand Down
6 changes: 3 additions & 3 deletions compiler/rustc_middle/src/mir/terminator.rs
Original file line number Diff line number Diff line change
Expand Up @@ -366,7 +366,7 @@ impl<O: fmt::Debug> fmt::Display for AssertKind<O> {
write!(f, "`async fn` resumed after completion")
}
ResumedAfterReturn(CoroutineKind::Desugared(CoroutineDesugaring::AsyncGen, _)) => {
todo!()
unimplemented!()
}
ResumedAfterReturn(CoroutineKind::Desugared(CoroutineDesugaring::Gen, _)) => {
bug!("gen blocks can be resumed after they return and will keep returning `None`")
Expand All @@ -378,7 +378,7 @@ impl<O: fmt::Debug> fmt::Display for AssertKind<O> {
write!(f, "`async fn` resumed after panicking")
}
ResumedAfterPanic(CoroutineKind::Desugared(CoroutineDesugaring::AsyncGen, _)) => {
todo!()
unimplemented!()
}
ResumedAfterPanic(CoroutineKind::Desugared(CoroutineDesugaring::Gen, _)) => {
write!(f, "`gen` fn or block cannot be further iterated on after it panicked")
Expand All @@ -394,7 +394,7 @@ impl<O: fmt::Debug> fmt::Display for AssertKind<O> {
write!(f, "`async fn` resumed after async drop")
}
ResumedAfterDrop(CoroutineKind::Desugared(CoroutineDesugaring::AsyncGen, _)) => {
todo!()
unimplemented!()
}
ResumedAfterDrop(CoroutineKind::Desugared(CoroutineDesugaring::Gen, _)) => {
write!(f, "`gen` fn or block cannot be further iterated on after it async dropped")
Expand Down
2 changes: 1 addition & 1 deletion compiler/rustc_middle/src/ty/adt.rs
Original file line number Diff line number Diff line change
Expand Up @@ -311,7 +311,7 @@ impl<'tcx> rustc_type_ir::inherent::AdtDef<TyCtxt<'tcx>> for AdtDef<'tcx> {

fn destructor(self, tcx: TyCtxt<'tcx>) -> Option<AdtDestructorKind> {
Some(match tcx.constness(self.destructor(tcx)?.did) {
hir::Constness::Const { always: true } => todo!("FIXME(comptime)"),
hir::Constness::Const { always: true } => unimplemented!("FIXME(comptime)"),
hir::Constness::Const { always: false } => AdtDestructorKind::Const,
hir::Constness::NotConst => AdtDestructorKind::NotConst,
})
Expand Down
2 changes: 1 addition & 1 deletion compiler/rustc_middle/src/ty/sty.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1815,7 +1815,7 @@ impl<'tcx> Ty<'tcx> {
// metadata of `tail`.
ty::Param(_) | ty::Alias(..) => Err(tail),

ty::UnsafeBinder(_) => todo!("FIXME(unsafe_binder)"),
ty::UnsafeBinder(_) => unimplemented!("FIXME(unsafe_binder)"),

ty::Infer(ty::TyVar(_))
| ty::Pat(..)
Expand Down
2 changes: 1 addition & 1 deletion compiler/rustc_middle/src/ty/util.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1302,7 +1302,7 @@ impl<'tcx> Ty<'tcx> {
| ty::Error(_)
| ty::FnPtr(..) => true,
// FIXME(unsafe_binders):
ty::UnsafeBinder(_) => todo!(),
ty::UnsafeBinder(_) => unimplemented!(),
ty::Tuple(fields) => fields.iter().all(Self::is_trivially_not_async_drop),
ty::Pat(elem_ty, _) | ty::Slice(elem_ty) | ty::Array(elem_ty, _) => {
elem_ty.is_trivially_not_async_drop()
Expand Down
3 changes: 3 additions & 0 deletions compiler/rustc_mir_build/src/diagnostics.rs
Original file line number Diff line number Diff line change
Expand Up @@ -679,6 +679,7 @@ impl<'a, G: EmissionGuarantee> Diagnostic<'a, G> for NonExhaustivePatternsTypeNo
diag.span_suggestion_verbose(
braces_span,
msg!("ensure that all possible cases are being handled by adding a match arm with a wildcard pattern as shown"),
// ignore-tidy-todo
format!(" {{{indentation}{more}_ => todo!(),{indentation}}}"),
Applicability::HasPlaceholders,
);
Expand Down Expand Up @@ -1296,6 +1297,7 @@ pub(crate) enum SuggestLet {
If {
#[suggestion_part(code = "if ")]
start_span: Span,
// ignore-tidy-todo
#[suggestion_part(code = " {{ todo!() }}")]
semi_span: Span,
count: usize,
Expand All @@ -1305,6 +1307,7 @@ pub(crate) enum SuggestLet {
[one] variant that isn't
*[other] variants that aren't
} matched",
// ignore-tidy-todo
code = " else {{ todo!() }}",
applicability = "has-placeholders"
)]
Expand Down
2 changes: 2 additions & 0 deletions compiler/rustc_mir_build/src/thir/pattern/check_match.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1376,9 +1376,11 @@ fn report_non_exhaustive_match<'p, 'tcx>(
// Arms with a never pattern don't take a body.
pattern
} else {
// ignore-tidy-todo
format!("{pattern} => todo!()")
}
} else {
// ignore-tidy-todo
format!("_ => todo!()")
};
let mut suggestion = None;
Expand Down
2 changes: 1 addition & 1 deletion compiler/rustc_mir_dataflow/src/value_analysis.rs
Original file line number Diff line number Diff line change
Expand Up @@ -594,7 +594,7 @@ impl<'tcx> Map<'tcx> {
if let Some(tail) = tail {
let ty = match tail {
TrackElem::Discriminant => ty.ty.discriminant_ty(tcx),
TrackElem::Variant(..) | TrackElem::Field(..) => todo!(),
TrackElem::Variant(..) | TrackElem::Field(..) => unimplemented!(),
TrackElem::DerefLen => tcx.types.usize,
};
place_index = self.register_place_index(ty, place_index, tail);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -541,7 +541,7 @@ impl<D: SolverDelegate<Interner = I>, I: Interner> TypeFolder<I> for Canonicaliz
}
}
}
ty::InferConst::Fresh(_) => todo!(),
ty::InferConst::Fresh(_) => unimplemented!(),
},
ty::ConstKind::Placeholder(placeholder) => match self.canonicalize_mode {
CanonicalizeMode::Input { .. } => {
Expand Down
4 changes: 2 additions & 2 deletions compiler/rustc_next_trait_solver/src/solve/effect_goals.rs
Original file line number Diff line number Diff line change
Expand Up @@ -289,7 +289,7 @@ where
_ecx: &mut EvalCtxt<'_, D>,
_goal: Goal<I, Self>,
) -> Result<Candidate<I>, NoSolutionOrRerunNonErased> {
todo!("Fn* are not yet const")
unimplemented!("Fn* are not yet const")
}

#[instrument(level = "trace", skip_all, ret)]
Expand Down Expand Up @@ -347,7 +347,7 @@ where
_goal: Goal<I, Self>,
_kind: rustc_type_ir::ClosureKind,
) -> Result<Candidate<I>, NoSolutionOrRerunNonErased> {
todo!("AsyncFn* are not yet const")
unimplemented!("AsyncFn* are not yet const")
}

fn consider_builtin_async_fn_kind_helper_candidate(
Expand Down
4 changes: 2 additions & 2 deletions compiler/rustc_next_trait_solver/src/solve/normalizes_to.rs
Original file line number Diff line number Diff line change
Expand Up @@ -796,7 +796,7 @@ where

ty::UnsafeBinder(_) => {
// FIXME(unsafe_binder): Figure out how to handle pointee for unsafe binders.
todo!()
unimplemented!()
}

ty::Infer(ty::TyVar(_) | ty::FreshTy(_) | ty::FreshIntTy(_) | ty::FreshFloatTy(_))
Expand Down Expand Up @@ -1018,7 +1018,7 @@ where

ty::UnsafeBinder(_) => {
// FIXME(unsafe_binders): instantiate this with placeholders?? i guess??
todo!("discr subgoal...")
unimplemented!("discr subgoal...")
}

// Given an alias, parameter, or placeholder we add an impl candidate normalizing to a rigid
Expand Down
2 changes: 1 addition & 1 deletion compiler/rustc_parse/src/errors.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// ignore-tidy-filelength
// ignore-tidy-file-filelength

use std::borrow::Cow;
use std::path::PathBuf;
Expand Down
2 changes: 1 addition & 1 deletion compiler/rustc_parse/src/parser/expr.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// ignore-tidy-filelength
// ignore-tidy-file-filelength

use core::mem;
use core::ops::{Bound, ControlFlow};
Expand Down
6 changes: 3 additions & 3 deletions compiler/rustc_public/src/unstable/convert/stable/mir.rs
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,7 @@ impl<'tcx> Stable<'tcx> for mir::Rvalue<'tcx> {
crate::mir::Rvalue::Aggregate(agg_kind.stable(tables, cx), operands)
}
CopyForDeref(place) => crate::mir::Rvalue::CopyForDeref(place.stable(tables, cx)),
WrapUnsafeBinder(..) => todo!("FIXME(unsafe_binders):"),
WrapUnsafeBinder(..) => unimplemented!("FIXME(unsafe_binders):"),
}
}
}
Expand Down Expand Up @@ -446,7 +446,7 @@ impl<'tcx> Stable<'tcx> for mir::PlaceElem<'tcx> {
// found at https://github.com/rust-lang/rust/pull/117517#issuecomment-1811683486
Downcast(_, idx) => crate::mir::ProjectionElem::Downcast(idx.stable(tables, cx)),
OpaqueCast(ty) => crate::mir::ProjectionElem::OpaqueCast(ty.stable(tables, cx)),
UnwrapUnsafeBinder(..) => todo!("FIXME(unsafe_binders):"),
UnwrapUnsafeBinder(..) => unimplemented!("FIXME(unsafe_binders):"),
}
}
}
Expand Down Expand Up @@ -748,7 +748,7 @@ impl<'tcx> Stable<'tcx> for mir::TerminatorKind<'tcx> {
target: target.map(|t| t.as_usize()),
unwind: unwind.stable(tables, cx),
},
mir::TerminatorKind::TailCall { func: _, args: _, fn_span: _ } => todo!(),
mir::TerminatorKind::TailCall { func: _, args: _, fn_span: _ } => unimplemented!(),
mir::TerminatorKind::Assert { cond, expected, msg, target, unwind } => {
TerminatorKind::Assert {
cond: cond.stable(tables, cx),
Expand Down
10 changes: 6 additions & 4 deletions compiler/rustc_public/src/unstable/convert/stable/ty.rs
Original file line number Diff line number Diff line change
Expand Up @@ -466,7 +466,7 @@ impl<'tcx> Stable<'tcx> for ty::TyKind<'tcx> {
TyKind::RigidTy(RigidTy::FnPtr(sig_tys.with(*hdr).stable(tables, cx)))
}
// FIXME(unsafe_binders):
ty::UnsafeBinder(_) => todo!(),
ty::UnsafeBinder(_) => unimplemented!(),
ty::Dynamic(existential_predicates, region) => TyKind::RigidTy(RigidTy::Dynamic(
existential_predicates
.iter()
Expand All @@ -478,7 +478,9 @@ impl<'tcx> Stable<'tcx> for ty::TyKind<'tcx> {
tables.closure_def(*def_id),
generic_args.stable(tables, cx),
)),
ty::CoroutineClosure(..) => todo!("FIXME(async_closures): Lower these to SMIR"),
ty::CoroutineClosure(..) => {
unimplemented!("FIXME(async_closures): Lower these to SMIR")
}
ty::Coroutine(def_id, generic_args) => TyKind::RigidTy(RigidTy::Coroutine(
tables.coroutine_def(*def_id),
generic_args.stable(tables, cx),
Expand Down Expand Up @@ -797,10 +799,10 @@ impl<'tcx> Stable<'tcx> for ty::ClauseKind<'tcx> {
crate::ty::ClauseKind::ConstEvaluatable(const_.stable(tables, cx))
}
ClauseKind::HostEffect(..) => {
todo!()
unimplemented!()
}
ClauseKind::UnstableFeature(_) => {
todo!()
unimplemented!()
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion compiler/rustc_resolve/src/error_helper.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// ignore-tidy-filelength
// ignore-tidy-file-filelength
use std::mem;
use std::ops::ControlFlow;

Expand Down
2 changes: 1 addition & 1 deletion compiler/rustc_resolve/src/late.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// ignore-tidy-filelength
// ignore-tidy-file-filelength
//! "Late resolution" is the pass that resolves most of names in a crate beside imports and macros.
//! It runs when the crate is fully expanded and its module structure is fully built.
//! So it just walks through the crate and resolves all the expressions, types, etc.
Expand Down
2 changes: 1 addition & 1 deletion compiler/rustc_resolve/src/late/diagnostics.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// ignore-tidy-filelength
// ignore-tidy-file-filelength

use std::borrow::Cow;
use std::iter;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -594,7 +594,7 @@ pub(crate) fn encode_ty<'tcx>(

// FIXME(unsafe_binders): Implement this.
ty::UnsafeBinder(_) => {
todo!()
unimplemented!()
}

// Trait types
Expand Down
2 changes: 1 addition & 1 deletion compiler/rustc_symbol_mangling/src/v0.rs
Original file line number Diff line number Diff line change
Expand Up @@ -594,7 +594,7 @@ impl<'tcx> Printer<'tcx> for V0SymbolMangler<'tcx> {
}

// FIXME(unsafe_binder):
ty::UnsafeBinder(..) => todo!(),
ty::UnsafeBinder(..) => unimplemented!(),

ty::Dynamic(predicates, r) => {
self.push("D");
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// ignore-tidy-filelength
// ignore-tidy-file-filelength
use core::ops::ControlFlow;
use std::borrow::Cow;
use std::collections::hash_set;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// ignore-tidy-filelength
// ignore-tidy-file-filelength

use std::borrow::Cow;
use std::path::PathBuf;
Expand Down
Loading