rust/library/core/src
bors 9257f5aad0 Auto merge of #94530 - tmiasko:alignment-impls, r=dtolnay
Implement Copy, Clone, PartialEq and Eq for core::fmt::Alignment

Alignment is a fieldless exhaustive enum, so it is already possible to
clone and compare it by matching, but it is inconvenient to do so. For
example, if one would like to create a struct describing a formatter
configuration and provide a clone implementation:

```rust
pub struct Format {
    fill: char,
    width: Option<usize>,
    align: fmt::Alignment,
}

impl Clone for Format {
    fn clone(&self) -> Self {
        Format {
            align: match self.align {
                fmt::Alignment::Left => fmt::Alignment::Left,
                fmt::Alignment::Right => fmt::Alignment::Right,
                fmt::Alignment::Center => fmt::Alignment::Center,
            },
            .. *self
        }
    }
}
```

Derive Copy, Clone, PartialEq, and Eq for Alignment for convenience.
2022-05-21 19:49:51 +00:00
..
alloc Remove potentially misleading realloc parenthetical 2022-05-14 22:30:14 -05:00
array Auto merge of #95602 - scottmcm:faster-array-intoiter-fold, r=the8472 2022-05-14 03:12:53 +00:00
async_iter Add Stream alias for AsyncIterator 2022-03-15 20:59:13 -07:00
char No need to check the assert all the time. 2022-04-16 19:30:23 +01:00
convert Warn on unused doc(hidden) on trait impl items 2022-05-08 22:53:14 +02:00
ffi generalize "incoherent impls" impl for custom types 2022-05-05 10:53:00 +02:00
fmt Auto merge of #94530 - tmiasko:alignment-impls, r=dtolnay 2022-05-21 19:49:51 +00:00
future Rename IntoFuture::Future to IntoFuture::IntoFuture 2022-03-10 20:51:52 +01:00
hash Auto merge of #95960 - jhpratt:remove-rustc_deprecated, r=compiler-errors 2022-05-09 04:47:30 +00:00
iter Auto merge of #95602 - scottmcm:faster-array-intoiter-fold, r=the8472 2022-05-14 03:12:53 +00:00
macros Auto merge of #95960 - jhpratt:remove-rustc_deprecated, r=compiler-errors 2022-05-09 04:47:30 +00:00
mem Auto merge of #95960 - jhpratt:remove-rustc_deprecated, r=compiler-errors 2022-05-09 04:47:30 +00:00
num Rename eq_ignore_case to starts_with_ignore_case 2022-05-15 23:59:59 +00:00
ops Add do yeet expressions to allow experimentation in nightly 2022-04-30 17:40:27 -07:00
panic Auto merge of #96348 - overdrivenpotato:inline-location, r=the8472 2022-04-30 16:33:12 +00:00
prelude Create 2024 edition 2022-04-02 02:45:49 -04:00
ptr make ptr::invalid not the same as a regular int2ptr cast 2022-05-20 17:16:41 +02:00
slice Stage-step cfgs 2022-05-18 12:29:35 -04:00
str Rollup merge of #97190 - SylvainDe:master, r=Dylan-DPC 2022-05-21 11:39:48 +02:00
sync Fix doc typo 2022-05-19 00:25:14 +03:00
task Remove some unnecessary rustc_allow_const_fn_unstable attributes. 2022-05-13 16:01:18 +10:00
unicode Regenerate tables for Unicode 14.0.0 2021-10-06 17:49:33 -07:00
any.rs Use implicit capture syntax in format_args 2022-03-10 10:23:40 -05:00
ascii.rs Inline <EscapeDefault as Iterator>::next 2022-03-10 15:35:22 +01:00
bool.rs Stabilize bool::then_some 2022-05-04 13:22:08 +02:00
borrow.rs Make Borrow and BorrowMut impls const 2021-12-04 21:57:39 +09:00
cell.rs Add a comment for covariant Ref 2022-05-16 17:24:53 -07:00
clone.rs trivial cfg(bootstrap) changes 2022-04-05 23:18:40 +02:00
cmp.rs Derive Eq for std::cmp::Ordering, instead of using manual impl. 2022-03-16 11:36:31 -05:00
default.rs Add documentation 2022-04-07 20:03:24 -04:00
hint.rs Clarify unreachable_unchecked docs 2022-05-06 09:34:41 +02:00
internal_macros.rs ignore a doctest for the non-exported macro 2022-05-03 18:33:56 +09:00
intrinsics.rs Rename unsigned_offset_from to sub_ptr 2022-05-11 17:16:25 -07:00
lazy.rs Rollup merge of #89869 - kpreid:from-doc, r=yaahc 2022-02-17 06:29:57 +01:00
lib.rs Stage-step cfgs 2022-05-18 12:29:35 -04:00
marker.rs trivial cfg(bootstrap) changes 2022-04-05 23:18:40 +02:00
option.rs Remove some unnecessary rustc_allow_const_fn_unstable attributes. 2022-05-13 16:01:18 +10:00
panic.rs resolve the conflict in compiler/rustc_session/src/parse.rs 2022-03-16 20:12:30 +08:00
panicking.rs trivial cfg(bootstrap) changes 2022-04-05 23:18:40 +02:00
pin.rs Fix formatting error in pin.rs docs 2022-04-10 12:41:31 -07:00
primitive_docs.rs Further refine the disclaimer about NaN bit patterns. 2022-03-31 18:18:10 +09:00
primitive.rs
result.rs Add do yeet expressions to allow experimentation in nightly 2022-04-30 17:40:27 -07:00
time.rs Adjust feature names that disagree on const stabilization version 2022-03-31 12:34:48 -07:00
tuple.rs Implement tuples using recursion 2022-04-12 16:23:36 -03:00
unit.rs Use implicit capture syntax in format_args 2022-03-10 10:23:40 -05:00