Skip to content

Commit 8a2d434

Browse files
authored
Unrolled build for #157706
Rollup merge of #157706 - jdonszelmann:deny-todo, r=wafflelapkin Deny `todo!()` in tidy Implements rust-lang/compiler-team#999 Part of #158173
2 parents 225e91c + ea03e5c commit 8a2d434

247 files changed

Lines changed: 1080 additions & 648 deletions

File tree

Some content is hidden

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

compiler/rustc_ast_lowering/src/diagnostics.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -365,6 +365,7 @@ pub(crate) struct MatchArmWithNoBody {
365365
pub span: Span,
366366
#[suggestion(
367367
"add a body after the pattern",
368+
// ignore-tidy-todo
368369
code = " => todo!(),",
369370
applicability = "has-placeholders"
370371
)]

compiler/rustc_ast_passes/src/diagnostics.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -999,6 +999,7 @@ pub(crate) struct MatchArmWithNoBody {
999999
// resulting code to be correct.
10001000
#[suggestion(
10011001
"add a body after the pattern",
1002+
// ignore-tidy-todo
10021003
code = " => {{ todo!() }}",
10031004
applicability = "has-placeholders",
10041005
style = "verbose"

compiler/rustc_borrowck/src/diagnostics/conflict_errors.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// ignore-tidy-filelength
1+
// ignore-tidy-file-filelength
22

33
use std::iter;
44
use std::ops::ControlFlow;

compiler/rustc_borrowck/src/places_conflict.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -520,7 +520,7 @@ fn place_projection_conflict<'tcx>(
520520
),
521521

522522
(ProjectionElem::UnwrapUnsafeBinder(_), _) => {
523-
todo!()
523+
unimplemented!()
524524
}
525525
}
526526
}

compiler/rustc_borrowck/src/universal_regions.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -398,7 +398,7 @@ impl<'tcx> UniversalRegions<'tcx> {
398398
});
399399
}
400400
DefiningTy::CoroutineClosure(..) => {
401-
todo!()
401+
unimplemented!()
402402
}
403403
DefiningTy::Coroutine(def_id, args) => {
404404
let v = with_no_trimmed_paths!(

compiler/rustc_builtin_macros/src/autodiff.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -564,7 +564,7 @@ mod llvm_enzyme {
564564
.iter()
565565
.map(|arg| match arg.pat.kind {
566566
PatKind::Ident(_, ident, _) => ecx.expr_path(ecx.path_ident(span, ident)),
567-
_ => todo!(),
567+
_ => unimplemented!(),
568568
})
569569
.collect::<ThinVec<_>>(),
570570
);

compiler/rustc_const_eval/src/interpret/validity.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -947,7 +947,7 @@ impl<'rt, 'tcx, M: Machine<'tcx>> ValidityVisitor<'rt, 'tcx, M> {
947947
// Nothing to check.
948948
interp_ok(true)
949949
}
950-
ty::UnsafeBinder(_) => todo!("FIXME(unsafe_binder)"),
950+
ty::UnsafeBinder(_) => unimplemented!("FIXME(unsafe_binder)"),
951951
// The above should be all the primitive types. The rest is compound, we
952952
// check them by visiting their fields/variants.
953953
ty::Adt(..)

compiler/rustc_expand/src/expand.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1905,7 +1905,7 @@ impl InvocationCollectorNode for ast::Pat {
19051905
}
19061906
}
19071907
fn as_target(&self) -> Target {
1908-
todo!();
1908+
unimplemented!();
19091909
}
19101910
}
19111911

compiler/rustc_hir/src/hir.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// ignore-tidy-filelength
1+
// ignore-tidy-file-filelength
22
use std::borrow::Cow;
33
use std::fmt;
44
use std::ops::Not;

compiler/rustc_hir_analysis/src/check/mod.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -508,6 +508,7 @@ fn fn_sig_suggestion<'tcx>(
508508
// lifetimes between the `impl` and the `trait`, but this should be good enough to
509509
// fill in a significant portion of the missing code, and other subsequent
510510
// suggestions can help the user fix the code.
511+
// ignore-tidy-todo
511512
format!("{safety}{asyncness}fn {ident}{generics}({args}){output}{where_clauses} {{ todo!() }}")
512513
}
513514

0 commit comments

Comments
 (0)