diff --git a/compiler/rustc_codegen_llvm/src/lib.rs b/compiler/rustc_codegen_llvm/src/lib.rs index bb264db22d9..a1b1dcb1278 100644 --- a/compiler/rustc_codegen_llvm/src/lib.rs +++ b/compiler/rustc_codegen_llvm/src/lib.rs @@ -141,18 +141,6 @@ fn target_machine_factory( back::write::target_machine_factory(sess, optlvl, target_features) } - fn spawn_thread(time_trace: bool, f: F) -> std::thread::JoinHandle - where - F: FnOnce() -> T, - F: Send + 'static, - T: Send + 'static, - { - std::thread::spawn(move || { - let _profiler = TimeTraceProfiler::new(time_trace); - f() - }) - } - fn spawn_named_thread( time_trace: bool, name: String, diff --git a/compiler/rustc_codegen_ssa/src/traits/backend.rs b/compiler/rustc_codegen_ssa/src/traits/backend.rs index 1991b55f191..0a02ca6b317 100644 --- a/compiler/rustc_codegen_ssa/src/traits/backend.rs +++ b/compiler/rustc_codegen_ssa/src/traits/backend.rs @@ -142,15 +142,6 @@ fn target_machine_factory( target_features: &[String], ) -> TargetMachineFactoryFn; - fn spawn_thread(_time_trace: bool, f: F) -> std::thread::JoinHandle - where - F: FnOnce() -> T, - F: Send + 'static, - T: Send + 'static, - { - std::thread::spawn(f) - } - fn spawn_named_thread( _time_trace: bool, name: String,