-
Notifications
You must be signed in to change notification settings - Fork 185
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Remove num_traits
dependency
#3373
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -72,7 +72,7 @@ pub const EXTRA_EXPERIMENTAL_DEPS: &[&str] = &[ | |
]; | ||
|
||
/// Dependencies allowed when opting in to LSTM segmenter | ||
pub const EXTRA_LSTM_DEPS: &[&str] = &["libm", "num-traits"]; | ||
pub const EXTRA_LSTM_DEPS: &[&str] = &["libm"]; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. praise: thanks for updating this. (I have plans to make this file complain if an allowlisted dep goes completely unused after all of the checks, but it's not priority) |
||
|
||
/// Dependencies allowed when opting in to fixed_decimal's `ryu` backend | ||
/// This should never change | ||
|
@@ -122,6 +122,7 @@ pub const EXTRA_DATAGEN_DEPS: &[&str] = &[ | |
"ndarray", | ||
"num-complex", | ||
"num-integer", | ||
"num-traits", | ||
"rawpointer", | ||
"regex-syntax", | ||
"rust-format", | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Question: before we introduced libm via num-traits, we had been using the f32::exp function. Now we're unconditionally using the libm version. Explain?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are we? In std mode this would fall back to
f32.exp()
, no?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Before we were either using the inherent
f32::exp
, ornum_traits::Float::f32
, which is backed bylibm
. This is doing the exact same thing.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Before we introduced
num_traits
we weren'tno_std
. Withstd
, function resolution will usef32::exp
, without it will useCoreFloat::exp
.