Skip to content

Commit 28963db

Browse files
authored
Unrolled build for rust-lang#140432
Rollup merge of rust-lang#140432 - tgross35:target-config-docs-update, r=jieyouxu Update documentation for `fn target_config` This was missed as part of [1]. [1]: rust-lang#140323
2 parents efcbb94 + e3458dc commit 28963db

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

compiler/rustc_codegen_ssa/src/traits/backend.rs

+4-5
Original file line numberDiff line numberDiff line change
@@ -45,15 +45,14 @@ pub trait CodegenBackend {
4545

4646
fn print(&self, _req: &PrintRequest, _out: &mut String, _sess: &Session) {}
4747

48-
/// Returns two feature sets:
49-
/// - The first has the features that should be set in `cfg(target_features)`.
50-
/// - The second is like the first, but also includes unstable features.
51-
///
52-
/// RUSTC_SPECIFIC_FEATURES should be skipped here, those are handled outside codegen.
48+
/// Collect target-specific options that should be set in `cfg(...)`, including
49+
/// `target_feature` and support for unstable float types.
5350
fn target_config(&self, _sess: &Session) -> TargetConfig {
5451
TargetConfig {
5552
target_features: vec![],
5653
unstable_target_features: vec![],
54+
// `true` is used as a default so backends need to acknowledge when they do not
55+
// support the float types, rather than accidentally quietly skipping all tests.
5756
has_reliable_f16: true,
5857
has_reliable_f16_math: true,
5958
has_reliable_f128: true,

0 commit comments

Comments
 (0)