Skip to content

Commit 026089b

Browse files
committed
Rename sym::nontrapping_fptoint.
1 parent 2002eba commit 026089b

File tree

2 files changed

+10
-6
lines changed

2 files changed

+10
-6
lines changed

src/librustc_codegen_llvm/builder.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -658,7 +658,7 @@ impl BuilderMethods<'a, 'tcx> for Builder<'a, 'll, 'tcx> {
658658
// `nontrapping-fptoint` target feature is activated. We'll use those if
659659
// they are available.
660660
if self.sess().target.target.arch == "wasm32"
661-
&& self.sess().target_features.contains(&sym::nontrapping_fptoint)
661+
&& self.sess().target_features.contains(&sym::nontrapping_dash_fptoint)
662662
{
663663
let src_ty = self.cx.val_ty(val);
664664
let float_width = self.cx.float_width(src_ty);
@@ -683,7 +683,7 @@ impl BuilderMethods<'a, 'tcx> for Builder<'a, 'll, 'tcx> {
683683
// `nontrapping-fptoint` target feature is activated. We'll use those if
684684
// they are available.
685685
if self.sess().target.target.arch == "wasm32"
686-
&& self.sess().target_features.contains(&sym::nontrapping_fptoint)
686+
&& self.sess().target_features.contains(&sym::nontrapping_dash_fptoint)
687687
{
688688
let src_ty = self.cx.val_ty(val);
689689
let float_width = self.cx.float_width(src_ty);

src/librustc_span/symbol.rs

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -102,9 +102,13 @@ symbols! {
102102
Union: "union",
103103
}
104104

105-
// Symbols that can be referred to with rustc_span::sym::*. The symbol is
106-
// the stringified identifier unless otherwise specified (e.g.
107-
// `proc_dash_macro` represents "proc-macro").
105+
// Pre-interned symbols that can be referred to with `rustc_span::sym::*`.
106+
//
107+
// The symbol is the stringified identifier unless otherwise specified, in
108+
// which case the name should mention the non-identifier punctuation.
109+
// E.g. `sym::proc_dash_macro` represents "proc-macro", and it shouldn't be
110+
// called `sym::proc_macro` because then it's easy to mistakenly think it
111+
// represents "proc_macro".
108112
//
109113
// As well as the symbols listed, there are symbols for the the strings
110114
// "0", "1", ..., "9", which are accessible via `sym::integer`.
@@ -567,7 +571,7 @@ symbols! {
567571
non_exhaustive,
568572
non_modrs_mods,
569573
nontemporal_store,
570-
nontrapping_fptoint: "nontrapping-fptoint",
574+
nontrapping_dash_fptoint: "nontrapping-fptoint",
571575
noreturn,
572576
no_niche,
573577
no_sanitize,

0 commit comments

Comments
 (0)