Skip to content

Commit 8f18b4d

Browse files
committed
Move supports_parallel from CodegenBackend to ExtraBackendMethods
It is only relevant when using cg_ssa for driving compilation.
1 parent 398f192 commit 8f18b4d

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

compiler/rustc_codegen_ssa/src/traits/backend.rs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -97,13 +97,6 @@ pub trait CodegenBackend {
9797
fn link(&self, sess: &Session, codegen_results: CodegenResults, outputs: &OutputFilenames) {
9898
link_binary(sess, &ArArchiveBuilderBuilder, codegen_results, outputs);
9999
}
100-
101-
/// Returns `true` if this backend can be safely called from multiple threads.
102-
///
103-
/// Defaults to `true`.
104-
fn supports_parallel(&self) -> bool {
105-
true
106-
}
107100
}
108101

109102
pub trait ExtraBackendMethods:
@@ -144,4 +137,11 @@ pub trait ExtraBackendMethods:
144137
{
145138
std::thread::Builder::new().name(name).spawn(f)
146139
}
140+
141+
/// Returns `true` if this backend can be safely called from multiple threads.
142+
///
143+
/// Defaults to `true`.
144+
fn supports_parallel(&self) -> bool {
145+
true
146+
}
147147
}

0 commit comments

Comments
 (0)