Skip to content

Commit d626981

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

643 files changed

Lines changed: 1461 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: 2 additions & 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>,
@@ -520,6 +521,7 @@ impl<'tcx> CPlace<'tcx> {
520521
self.write_cvalue_maybe_transmute(fx, from, "write_cvalue_transmute");
521522
}
522523

524+
#[cfg_attr(not(bootstrap), allow(todo_macro_calls))]
523525
fn write_cvalue_maybe_transmute(
524526
self,
525527
fx: &mut FunctionCx<'_, '_, 'tcx>,

compiler/rustc_codegen_gcc/src/builder.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -943,6 +943,7 @@ impl<'a, 'gcc, 'tcx> BuilderMethods<'a, 'tcx> for Builder<'a, 'gcc, 'tcx> {
943943
.get_address(self.location)
944944
}
945945

946+
#[cfg_attr(not(bootstrap), allow(todo_macro_calls))]
946947
fn scalable_alloca(&mut self, _elt: u64, _align: Align, _element_ty: Ty<'_>) -> RValue<'gcc> {
947948
todo!()
948949
}

compiler/rustc_codegen_gcc/src/type_of.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ impl<'gcc, 'tcx> CodegenCx<'gcc, 'tcx> {
5656
}
5757
}
5858

59+
#[cfg_attr(not(bootstrap), allow(todo_macro_calls))]
5960
fn uncached_gcc_type<'gcc, 'tcx>(
6061
cx: &CodegenCx<'gcc, 'tcx>,
6162
layout: TyAndLayout<'tcx>,
@@ -177,6 +178,7 @@ pub trait LayoutGccExt<'tcx> {
177178
}
178179

179180
impl<'tcx> LayoutGccExt<'tcx> for TyAndLayout<'tcx> {
181+
#[cfg_attr(not(bootstrap), allow(todo_macro_calls))]
180182
fn is_gcc_immediate(&self) -> bool {
181183
match self.backend_repr {
182184
BackendRepr::Scalar(_) | BackendRepr::SimdVector { .. } => true,

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
}

0 commit comments

Comments
 (0)