about summary refs log tree commit diff
path: root/compiler/rustc_codegen_ssa/src
diff options
context:
space:
mode:
authorDylan DPC <dylan.dpc@gmail.com>2021-04-05 13:03:37 +0200
committerGitHub <noreply@github.com>2021-04-05 13:03:37 +0200
commite64dbb1f46a3058c6d152a35bd601685cb7cdc09 (patch)
tree2b914299377ab1ae561b43094ccaa40f6d69de8d /compiler/rustc_codegen_ssa/src
parent54ea8e1b82a67202e64f8aac1ed57bc7b987e508 (diff)
parent1ec905766d0c8b76ecef22d1948fe87a490da3fd (diff)
downloadrust-e64dbb1f46a3058c6d152a35bd601685cb7cdc09.tar.gz
rust-e64dbb1f46a3058c6d152a35bd601685cb7cdc09.zip
Rollup merge of #82483 - tmiasko:option-from-str, r=matthewjasper
Use FromStr trait for number option parsing

Replace `parse_uint` with generic `parse_number` based on `FromStr`.
Use it for parsing inlining threshold to avoid casting later.
Diffstat (limited to 'compiler/rustc_codegen_ssa/src')
-rw-r--r--compiler/rustc_codegen_ssa/src/back/write.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/rustc_codegen_ssa/src/back/write.rs b/compiler/rustc_codegen_ssa/src/back/write.rs
index c45c90f24de..04d06864ee1 100644
--- a/compiler/rustc_codegen_ssa/src/back/write.rs
+++ b/compiler/rustc_codegen_ssa/src/back/write.rs
@@ -107,7 +107,7 @@ pub struct ModuleConfig {
     pub vectorize_loop: bool,
     pub vectorize_slp: bool,
     pub merge_functions: bool,
-    pub inline_threshold: Option<usize>,
+    pub inline_threshold: Option<u32>,
     pub new_llvm_pass_manager: bool,
     pub emit_lifetime_markers: bool,
 }