granite-rust/library/core/src
Matthias Krüger f8dae0c20a
Rollup merge of #116481 - scottmcm:tweak-combinators, r=cuviper
Reuse existing `Some`s in `Option::(x)or`

LLVM still has trouble re-using discriminants sometimes when rebuilding a two-variant enum, so when we have the correct variant already built, just use it.

That's shorter in the Rust code, as well as simpler in MIR and the optimized LLVM, so might as well: <https://rust.godbolt.org/z/KhdE8eToW>

Thanks to `@veber-alex` for pointing out this opportunity in https://github.com/rust-lang/rust/issues/101210#issuecomment-1732470941
2023-10-06 21:17:50 +02:00
..
alloc Rollup merge of #107916 - reez12g:issue-107040, r=Amanieu 2023-05-30 12:57:38 +02:00
array Add more diagnostic items for clippy 2023-10-05 18:21:47 -04:00
ascii fix Debug impl for AsciiChar 2023-09-01 12:29:40 +01:00
async_iter use consistent terminology 2022-10-29 09:23:12 +02:00
cell Rollup merge of #109318 - joboet:better_fmt_placeholder, r=dtolnay 2023-07-31 22:51:12 +02:00
char Auto merge of #114299 - clarfonthey:char-min, r=dtolnay,BurntSushi 2023-09-08 00:02:48 +00:00
cmp Merge two different equality specialization traits in core 2023-03-01 14:42:06 -08:00
convert Rollup merge of #114564 - scottmcm:when-to-from, r=dtolnay 2023-10-06 21:17:48 +02:00
ffi Auto merge of #114443 - tgross35:cstr-len, r=dtolnay 2023-09-20 00:02:45 +00:00
fmt Add more diagnostic items for clippy 2023-10-05 18:21:47 -04:00
future Rollup merge of #109970 - danielhenrymantilla:add-poll-fn-pin-clarifications, r=thomcc 2023-06-19 19:26:25 +02:00
hash clarify that unsafe code must not rely on our safe traits 2023-09-06 16:12:39 +02:00
intrinsics Support bootstrap. 2023-09-01 16:18:50 +00:00
iter Rollup merge of #116198 - Jarcho:diag_items, r=WaffleLapkin 2023-10-06 13:18:34 +02:00
macros Appease tidy 2023-10-02 19:22:42 -04:00
mem Rollup merge of #116329 - RalfJung:swap-comments, r=scottmcm 2023-10-06 13:18:35 +02:00
net Remove special cases that are no longer needed due to #112606 2023-08-25 03:54:28 +02:00
num Auto merge of #114042 - liushuyu:ubuntu/i586-fpmath, r=workingjubilee 2023-10-05 13:35:18 +00:00
ops Add more diagnostic items for clippy 2023-10-05 18:21:47 -04:00
panic avoid triple-backtrace due to panic-during-cleanup 2023-08-27 20:02:46 +02:00
prelude Revert "Remove #[alloc_error_handler] from the compiler and library" 2023-04-25 00:08:35 +02:00
ptr Add more diagnostic items for clippy 2023-10-05 18:21:47 -04:00
slice Add more diagnostic items for clippy 2023-10-05 18:21:47 -04:00
str Rollup merge of #116198 - Jarcho:diag_items, r=WaffleLapkin 2023-10-06 13:18:34 +02:00
sync Add Exclusive forwarding impls (FnOnce, FnMut, Generator) 2023-09-28 10:22:19 -07:00
task Auto merge of #96875 - SabrinaJewson:noop-waker, r=m-ou-se 2023-06-07 06:04:32 +00:00
unicode Apply changes to fix python linting errors 2023-06-16 20:56:01 -04:00
any.rs core/any: remove Provider trait 2023-08-13 13:07:53 -06:00
arch.rs move core::arch into separate file 2022-11-20 10:28:14 +01:00
ascii.rs ascii::Char-ify the escaping code 2023-05-12 19:37:02 -07:00
asserting.rs [RFC 2011] Library code 2022-05-22 07:18:32 -03:00
bool.rs core is now compilable 2023-04-16 07:20:26 +00:00
borrow.rs doc: replace wrong punctuation mark 2023-07-28 14:46:17 +02:00
cell.rs Add more diagnostic items for clippy 2023-10-05 18:21:47 -04:00
clone.rs Explain more clearly why fn() -> T can't be #[derive(Clone)] 2023-07-30 18:04:38 +02:00
cmp.rs Add more diagnostic items for clippy 2023-10-05 18:21:47 -04:00
default.rs Add more diagnostic items for clippy 2023-10-05 18:21:47 -04:00
error.md Fix minor grammar typo 2023-09-06 09:47:22 -07:00
error.rs add missing feature(error_in_core) 2023-08-15 08:21:41 +02:00
escape.rs Rename copying ascii::Char methods from as_ to to_ 2023-08-08 16:03:47 -07:00
hint.rs Rollup merge of #116350 - Nilstrieb:in-situ, r=Dylan-DPC 2023-10-02 16:09:43 -04:00
internal_macros.rs rm const traits in libcore 2023-04-16 06:49:27 +00:00
intrinsics.rs Add more diagnostic items for clippy 2023-10-05 18:21:47 -04:00
lib.rs Disable CFI for core and std CFI violations 2023-10-04 10:05:54 -07:00
marker.rs ConstParamTy: require Eq 2023-09-24 23:38:07 +02:00
option.rs Reuse existing Somes in Option::(x)or 2023-10-06 01:41:48 -07:00
panic.rs Auto merge of #115670 - Zoxc:outline-panic-macro-1, r=Mark-Simulacrum 2023-10-01 05:56:47 +00:00
panicking.rs Auto merge of #115670 - Zoxc:outline-panic-macro-1, r=Mark-Simulacrum 2023-10-01 05:56:47 +00:00
pin.rs Clarify example in Pin::new_unchecked docs 2023-09-23 17:28:43 +02:00
primitive.rs mv std libs to library/ 2020-07-27 19:51:13 -05:00
primitive_docs.rs Clarify float rounding direction for signed zero 2023-10-02 22:05:17 +02:00
result.rs Add track_caller attribute to Result::unwrap_or_else 2023-10-01 09:42:37 -05:00
time.rs Add missing inline attributes to Duration trait impls 2023-10-03 18:39:56 +03:00
tuple.rs get rid of duplicate primitive_docs 2023-09-18 08:17:36 +02:00
unit.rs Use implicit capture syntax in format_args 2022-03-10 10:23:40 -05:00