rust/library/core/src
Matthias Krüger 1dbb5efff3
Rollup merge of #107442 - lukas-code:slice-panics, r=cuviper
improve panic message for slice windows and chunks

before:
```text
thread 'main' panicked at 'size is zero', /rustc/1e225413a21fa69570bd3fefea9eb05e33f8b917/library/core/src/slice/mod.rs:809:44
```
```text
thread 'main' panicked at 'assertion failed: `(left != right)`
  left: `0`,
 right: `0`: chunks cannot have a size of zero', /rustc/1e225413a21fa69570bd3fefea9eb05e33f8b917/library/core/src/slice/mod.rs:843:9
```

after:
```text
thread 'main' panicked at 'chunk size must be non-zero', src/main.rs:4:22
```

fixes https://github.com/rust-lang/rust/issues/107437
2023-02-01 05:54:38 +01:00
..
alloc Rollup merge of #102207 - CraftSpider:const-layout, r=scottmcm 2022-11-22 01:26:07 -05:00
array Remove various double spaces in source comments. 2023-01-14 17:22:04 +01:00
async_iter use consistent terminology 2022-10-29 09:23:12 +02:00
cell Add OnceCell<T>: !Sync impl for diagnostics 2023-01-19 20:14:21 +01:00
char update stabilization version numbers 2022-12-28 09:18:42 -05:00
convert Set version placeholders to 1.68 2023-01-25 09:44:29 -05:00
ffi Implement va_list and va_arg for s390x FFI 2022-12-19 21:07:57 +01:00
fmt Auto merge of #106745 - m-ou-se:format-args-ast, r=oli-obk 2023-01-26 12:44:47 +00:00
future Remove GenFuture from core 2023-01-29 15:20:03 +01:00
hash Fix some ~const usage in libcore 2022-12-20 15:01:37 +00:00
intrinsics Auto merge of #107297 - Mark-Simulacrum:bump-bootstrap, r=pietroalbini 2023-01-31 19:24:29 +00:00
iter Auto merge of #107297 - Mark-Simulacrum:bump-bootstrap, r=pietroalbini 2023-01-31 19:24:29 +00:00
macros Remove HTML tags around warning 2023-01-06 13:20:58 +01:00
mem stage-step cfgs 2023-01-30 13:09:09 -05:00
num end entry paragraph with a period (.) 2023-01-30 07:37:02 +02:00
ops Rollup merge of #107389 - zvavybir:master, r=estebank 2023-02-01 05:54:37 +01:00
panic Replace libstd, libcore, liballoc in line comments. 2022-12-30 14:00:42 +01:00
prelude Replace libstd, libcore, liballoc in docs. 2022-12-30 14:00:40 +01:00
ptr sub_ptr() is equivalent to usize::try_from().unwrap_unchecked(), not usize::from().unwrap_unchecked(). 2023-01-23 14:42:32 +02:00
slice improve panic message for slice windows and chunks 2023-01-31 23:49:42 +01:00
str Auto merge of #95644 - WaffleLapkin:str_split_as_str_refactor_take2, r=Amanieu 2023-01-03 11:06:08 +00:00
sync core: Support variety of atomic widths in width-agnostic functions 2023-01-25 10:44:03 +08:00
task stage-step cfgs 2023-01-30 13:09:09 -05:00
unicode Replace libstd, libcore, liballoc in line comments. 2022-12-30 14:00:42 +01:00
any.rs Constify TypeId ordering impls 2023-01-16 21:26:03 +01:00
arch.rs move core::arch into separate file 2022-11-20 10:28:14 +01:00
ascii.rs Inline <EscapeDefault as Iterator>::next 2022-03-10 15:35:22 +01:00
asserting.rs [RFC 2011] Library code 2022-05-22 07:18:32 -03:00
bool.rs Add missing assertion 2022-09-22 02:12:06 -04:00
borrow.rs Minor grammar nit. 2022-12-12 16:22:01 -07:00
cell.rs impl DispatchFromDyn for Cell and UnsafeCell 2023-01-24 12:06:12 +01:00
clone.rs Make some trivial functions #[inline(always)] 2022-12-07 17:11:17 +01:00
cmp.rs stage-step cfgs 2023-01-30 13:09:09 -05:00
const_closure.rs Update bootstrap cfg 2022-12-28 09:18:43 -05:00
default.rs cfg-step code 2022-11-06 17:21:21 -05:00
error.md Small round of typo fixes 2022-11-04 20:06:18 -07:00
error.rs Reintroduce multiple_supertrait_upcastable lint 2023-01-28 15:08:07 +00:00
hint.rs Improve the documentation of black_box 2023-01-07 15:44:38 -05:00
internal_macros.rs ignore a doctest for the non-exported macro 2022-05-03 18:33:56 +09:00
intrinsics.rs stage-step cfgs 2023-01-30 13:09:09 -05:00
lib.rs Auto merge of #107297 - Mark-Simulacrum:bump-bootstrap, r=pietroalbini 2023-01-31 19:24:29 +00:00
marker.rs Add rustc_on_unimplemented on Sync for cell types 2023-01-19 21:09:25 +01:00
option.rs Link to the LLVM issue from a comment on SpecOptionPartialEq 2023-01-27 19:09:52 -08:00
panic.rs Replace libstd, libcore, liballoc in docs. 2022-12-30 14:00:40 +01:00
panicking.rs stage-step cfgs 2023-01-30 13:09:09 -05:00
pin.rs Set version placeholders to 1.68 2023-01-25 09:44:29 -05:00
primitive.rs mv std libs to library/ 2020-07-27 19:51:13 -05:00
primitive_docs.rs disable strict-provenance-violating doctests in Miri 2022-11-22 11:49:02 +01:00
result.rs Improve wording for Option and Result 2022-12-13 14:49:10 -05:00
time.rs Bump version placeholders to release 2022-11-06 17:11:02 -05:00
tuple.rs const Compare Tuples 2022-11-09 09:52:04 +01:00
unit.rs Use implicit capture syntax in format_args 2022-03-10 10:23:40 -05:00