rust/library/core/src/num
Matthias Krüger 95750ae439
Rollup merge of #89897 - jkugelman:must-use-core, r=joshtriplett
Add #[must_use] to remaining core functions

I've run out of compelling reasons to group functions together across crates so I'm just going to go module-by-module. This is everything remaining from the `core` crate.

Ignored by clippy for reasons unknown:

```rust
core::alloc::Layout   unsafe fn for_value_raw<T: ?Sized>(t: *const T) -> Self;
core::any             const fn type_name_of_val<T: ?Sized>(_val: &T) -> &'static str;
```

Ignored by clippy because of `mut`:

```rust
str   fn split_at_mut(&mut self, mid: usize) -> (&mut str, &mut str);
```

<del>
Ignored by clippy presumably because a caller might want `f` called for side effects. That seems like a bad usage of `map` to me.

```rust
core::cell::Ref<'b, T>   fn map<U: ?Sized, F>(orig: Ref<'b, T>, f: F) -> Ref<'b, T>;
core::cell::Ref<'b, T>   fn map_split<U: ?Sized, V: ?Sized, F>(orig: Ref<'b, T>, f: F) -> (Ref<'b, U>, Ref<'b, V>);
```
</del>

Parent issue: #89692

r? ```@joshtriplett```
2021-10-31 09:20:26 +01:00
..
dec2flt Use if-let guards in the codebase 2021-08-25 20:24:35 +02:00
flt2dec Changed dec2flt to use the Eisel-Lemire algorithm. 2021-07-17 00:30:34 -05:00
shells Convert the rest of the standard library primitives to intra-doc links 2021-02-25 20:32:49 -05:00
bignum.rs [clippy] remove redundant field names 2021-05-02 20:24:17 -04:00
diy_float.rs Fix assert in diy_float 2021-07-27 16:02:35 -04:00
error.rs Rollup merge of #89897 - jkugelman:must-use-core, r=joshtriplett 2021-10-31 09:20:26 +01:00
f32.rs Rollup merge of #89897 - jkugelman:must-use-core, r=joshtriplett 2021-10-31 09:20:26 +01:00
f64.rs Rollup merge of #89897 - jkugelman:must-use-core, r=joshtriplett 2021-10-31 09:20:26 +01:00
fmt.rs Revert "Auto merge of #89709 - clemenswasser:apply_clippy_suggestions_2, r=petrochenkov" 2021-10-15 11:28:23 +02:00
int_log10.rs Add #[inline] to int log10 functions. 2021-10-12 15:21:14 +02:00
int_macros.rs replace & with && in {integer}::checked_rem 2021-10-27 17:01:05 +02:00
mod.rs Add #[must_use] to is_condition tests 2021-10-09 21:27:13 -04:00
nonzero.rs Added const versions of common numeric operations 2021-10-22 10:03:18 +13:00
saturating.rs Rollup merge of #88624 - kellerkindt:master, r=JohnTitor 2021-10-22 19:42:42 +09:00
uint_macros.rs replace | with || in {unsigned_int}::borrowing_sub 2021-10-27 17:00:46 +02:00
wrapping.rs Added const versions of common numeric operations 2021-10-22 10:03:18 +13:00