about summary refs log tree commit diff
path: root/library/core/src/convert/num.rs
AgeCommit message (Collapse)AuthorLines
2025-09-01Constify conversion traitsltdk-9/+10
2025-07-21Constify Try, From, TryFromEvgenii Zheltonozhskii-8/+16
2025-06-02remove f16: From<u16>usamoi-1/+0
2025-03-11Add `From<{integer}>` for `f16`/`f128` implsbeetrees-2/+48
2024-07-26Fix doc nitsJohn Arundel-4/+4
Many tiny changes to stdlib doc comments to make them consistent (for example "Returns foo", rather than "Return foo", per RFC1574), adding missing periods, paragraph breaks, backticks for monospace style, and other minor nits. https://github.com/rust-lang/rfcs/blob/master/text/1574-more-api-documentation-conventions.md#appendix-a-full-conventions-text
2024-05-04Re-add `From<f16> for f64`beetrees-2/+3
2024-04-11Remove `From` impls for unstable types that break inferenceTrevor Gross-2/+2
Adding additional `From` implementations that fit `f32::from(<unaffixed float>)` broke inference. Remove these for now. Fixes: <https://github.com/rust-lang/rust/issues/123824>
2024-04-10Add basic library support for `f16` and `f128`Trevor Gross-0/+7
Implement basic operation traits that get lowered to intrinsics. This includes codegen tests for implemented operations.
2024-03-25Import the 2021 prelude in the core crateDaniel Paoliello-4/+0
2024-02-19Refactor trait implementations in `core::convert::num`.Markus Reiter-367/+325
2023-12-10remove redundant importssurechen-1/+1
detects redundant imports that can be eliminated. for #117772 : In order to facilitate review and modification, split the checking code and removing redundant imports code into two PR.
2023-08-25use the correct linkcui fliter-2/+2
Signed-off-by: cui fliter <imcusg@gmail.com>
2023-04-16rm const traits in libcoreDeadbeef-16/+8
2023-03-09Add examples section which demonstrates the behaviour (specifically the sign ↵bmoxb-0/+20
positive aspect)
2023-03-09Add missing comment for f64bmoxb-1/+2
2023-03-09Indicate that `0.0` refers to positive `0.0`bmoxb-2/+2
2023-03-09Document the resulting values produced when using `From<bool>` on floatsbmoxb-1/+2
2023-01-25Set version placeholders to 1.68Mark Rousskov-2/+2
2022-12-15Implement `From<bool>` for f32, f64Jacob Pratt-0/+20
2022-12-04Make integer-to-integer `From` impls `#[inline(always)]`Eduardo Sánchez Muñoz-1/+1
2022-05-08Warn on unused doc(hidden) on trait impl itemsLeón Orell Valerian Liehr-1/+0
2021-10-20Make `From` impls of NonZero integer const.woppopo-2/+3
I also changed the feature gate added to `From` impls of Atomic integer to `const_num_from_num` from `const_convert`.
2021-08-07impl const From<num> for numAlbin Hedman-5/+10
2021-06-23Use HTTPS links where possibleSmitty-1/+1
2021-04-22Get rid of "[+] show undocumented items" toggle on numeric From implsMichael Howell-4/+12
On most From implementations, the docstring is attached to the function. This is also how people have been [recommended] to do it. Screenshots: * [before](https://user-images.githubusercontent.com/1593513/115767662-323c5480-a35e-11eb-9918-98aba83e9183.png) * [after](https://user-images.githubusercontent.com/1593513/115767675-35374500-a35e-11eb-964f-c28eeb6c807a.png) [recommended]: https://github.com/rust-lang/rust/issues/51430#issuecomment-398322434
2021-03-02FloatToInit: Replacing round_unchecked_to --> to_int_uncheckedPeter Kehl-1/+1
FloatToInit docs: Replacing round_unchecked_to with to_int_unchecked. Bug #82709.
2020-10-15Bump nzint_try_from_nzint_conv stabilization version to 1.49.Mara Bos-1/+1
Missed the 1.48 cycle.
2020-09-29Implement TryFrom between NonZero types.Mara Bos-0/+46
2020-07-27mv std libs to library/mark-0/+487