diff options
| author | Nicholas Nethercote <nnethercote@mozilla.com> | 2020-07-08 11:54:27 +1000 |
|---|---|---|
| committer | Nicholas Nethercote <nnethercote@mozilla.com> | 2020-07-15 08:42:59 +1000 |
| commit | 026089bdb54b8501bf62517bcdc2b8e5bc378c55 (patch) | |
| tree | 53e414536b90b2d66a0a6fc7a153fe35064b0a5c /src | |
| parent | 2002ebacfbca288830a3c308ddc8189705c608fe (diff) | |
| download | rust-026089bdb54b8501bf62517bcdc2b8e5bc378c55.tar.gz rust-026089bdb54b8501bf62517bcdc2b8e5bc378c55.zip | |
Rename `sym::nontrapping_fptoint`.
Diffstat (limited to 'src')
| -rw-r--r-- | src/librustc_codegen_llvm/builder.rs | 4 | ||||
| -rw-r--r-- | src/librustc_span/symbol.rs | 12 |
2 files changed, 10 insertions, 6 deletions
diff --git a/src/librustc_codegen_llvm/builder.rs b/src/librustc_codegen_llvm/builder.rs index 89b70dce52c..6a38323f7ca 100644 --- a/src/librustc_codegen_llvm/builder.rs +++ b/src/librustc_codegen_llvm/builder.rs @@ -658,7 +658,7 @@ impl BuilderMethods<'a, 'tcx> for Builder<'a, 'll, 'tcx> { // `nontrapping-fptoint` target feature is activated. We'll use those if // they are available. if self.sess().target.target.arch == "wasm32" - && self.sess().target_features.contains(&sym::nontrapping_fptoint) + && self.sess().target_features.contains(&sym::nontrapping_dash_fptoint) { let src_ty = self.cx.val_ty(val); let float_width = self.cx.float_width(src_ty); @@ -683,7 +683,7 @@ impl BuilderMethods<'a, 'tcx> for Builder<'a, 'll, 'tcx> { // `nontrapping-fptoint` target feature is activated. We'll use those if // they are available. if self.sess().target.target.arch == "wasm32" - && self.sess().target_features.contains(&sym::nontrapping_fptoint) + && self.sess().target_features.contains(&sym::nontrapping_dash_fptoint) { let src_ty = self.cx.val_ty(val); let float_width = self.cx.float_width(src_ty); diff --git a/src/librustc_span/symbol.rs b/src/librustc_span/symbol.rs index 6b3dbd0bf7a..85039f42a10 100644 --- a/src/librustc_span/symbol.rs +++ b/src/librustc_span/symbol.rs @@ -102,9 +102,13 @@ symbols! { Union: "union", } - // Symbols that can be referred to with rustc_span::sym::*. The symbol is - // the stringified identifier unless otherwise specified (e.g. - // `proc_dash_macro` represents "proc-macro"). + // Pre-interned symbols that can be referred to with `rustc_span::sym::*`. + // + // The symbol is the stringified identifier unless otherwise specified, in + // which case the name should mention the non-identifier punctuation. + // E.g. `sym::proc_dash_macro` represents "proc-macro", and it shouldn't be + // called `sym::proc_macro` because then it's easy to mistakenly think it + // represents "proc_macro". // // As well as the symbols listed, there are symbols for the the strings // "0", "1", ..., "9", which are accessible via `sym::integer`. @@ -567,7 +571,7 @@ symbols! { non_exhaustive, non_modrs_mods, nontemporal_store, - nontrapping_fptoint: "nontrapping-fptoint", + nontrapping_dash_fptoint: "nontrapping-fptoint", noreturn, no_niche, no_sanitize, |
