Skip to content

Commit 2ebfbca

Browse files
committed
reduce unreachable-code churn after todo!()
1 parent 5bbdeaa commit 2ebfbca

641 files changed

Lines changed: 1457 additions & 863 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_borrowck/src/places_conflict.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -286,7 +286,8 @@ fn place_components_conflict<'tcx>(
286286

287287
// Given that the bases of `elem1` and `elem2` are always either equal
288288
// or disjoint (and have the same type!), return the overlap situation
289-
// between `elem1` and `elem2`.
289+
// between `elem1` and `elem2`
290+
#[cfg_attr(not(bootstrap), allow(todo_macro_calls))]
290291
fn place_projection_conflict<'tcx>(
291292
tcx: TyCtxt<'tcx>,
292293
body: &Body<'tcx>,

compiler/rustc_borrowck/src/universal_regions.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -369,6 +369,7 @@ impl<'tcx> UniversalRegions<'tcx> {
369369
/// that this region imposes on others. The methods in this file
370370
/// handle the part about dumping the inference context internal
371371
/// state.
372+
#[cfg_attr(not(bootstrap), allow(todo_macro_calls))]
372373
pub(crate) fn annotate(&self, tcx: TyCtxt<'tcx>, err: &mut Diag<'_, ()>) {
373374
match self.defining_ty {
374375
DefiningTy::Closure(def_id, args) => {

compiler/rustc_builtin_macros/src/autodiff.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -501,6 +501,7 @@ mod llvm_enzyme {
501501
// ```
502502
// std::intrinsics::autodiff(source as fn(..) -> .., diff, (args))
503503
// ```
504+
#[cfg_attr(not(bootstrap), allow(todo_macro_calls))]
504505
fn call_autodiff(
505506
ecx: &ExtCtxt<'_>,
506507
primal: Ident,

compiler/rustc_codegen_cranelift/src/debuginfo/unwind.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ pub(crate) struct UnwindContext {
2525
}
2626

2727
impl UnwindContext {
28+
#[cfg_attr(not(bootstrap), allow(todo_macro_calls))]
2829
pub(crate) fn new(module: &mut dyn Module, pic_eh_frame: bool) -> Self {
2930
let endian = match module.isa().endianness() {
3031
Endianness::Little => RunTimeEndian::Little,

compiler/rustc_codegen_cranelift/src/intrinsics/llvm_x86.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ use crate::inline_asm::{CInlineAsmOperand, codegen_inline_asm_inner};
77
use crate::intrinsics::*;
88
use crate::prelude::*;
99

10+
#[cfg_attr(not(bootstrap), allow(todo_macro_calls))]
1011
pub(super) fn codegen_x86_llvm_intrinsic_call<'tcx>(
1112
fx: &mut FunctionCx<'_, '_, 'tcx>,
1213
intrinsic: &str,

compiler/rustc_codegen_cranelift/src/value_and_place.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -180,6 +180,7 @@ impl<'tcx> CValue<'tcx> {
180180
}
181181
}
182182

183+
#[cfg_attr(not(bootstrap), allow(todo_macro_calls))]
183184
pub(crate) fn value_field(
184185
self,
185186
fx: &mut FunctionCx<'_, '_, 'tcx>,

compiler/rustc_const_eval/src/interpret/validity.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -829,6 +829,7 @@ impl<'rt, 'tcx, M: Machine<'tcx>> ValidityVisitor<'rt, 'tcx, M> {
829829
/// at that type. Return `true` if the type is indeed primitive.
830830
///
831831
/// Note that not all of these have `FieldsShape::Primitive`, e.g. wide references.
832+
#[cfg_attr(not(bootstrap), allow(todo_macro_calls))]
832833
fn try_visit_primitive(
833834
&mut self,
834835
value: &PlaceTy<'tcx, M::Provenance>,

compiler/rustc_expand/src/expand.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1934,6 +1934,7 @@ impl InvocationCollectorNode for ast::Pat {
19341934
_ => unreachable!(),
19351935
}
19361936
}
1937+
#[cfg_attr(not(bootstrap), allow(todo_macro_calls))]
19371938
fn as_target(&self) -> Target {
19381939
todo!();
19391940
}

compiler/rustc_hir_typeck/src/cast.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,7 @@ enum PointerKind<'tcx> {
8686
impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
8787
/// Returns the kind of unsize information of t, or None
8888
/// if t is unknown.
89+
#[cfg_attr(not(bootstrap), allow(todo_macro_calls))]
8990
fn pointer_kind(
9091
&self,
9192
t: Ty<'tcx>,

compiler/rustc_hir_typeck/src/closure.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ struct ClosureSignatures<'tcx> {
4545

4646
impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
4747
#[instrument(skip(self, closure), level = "debug")]
48+
#[cfg_attr(not(bootstrap), allow(todo_macro_calls))]
4849
pub(crate) fn check_expr_closure(
4950
&self,
5051
closure: &hir::Closure<'tcx>,

0 commit comments

Comments
 (0)