about summary refs log tree commit diff
path: root/src/libcore
AgeCommit message (Collapse)AuthorLines
2019-12-23Rollup merge of #67466 - oli-obk:const_intrinsic, r=CentrilMazdak Farrokhzad-0/+46
Require const stability attributes on intrinsics to be able to use them in constant contexts r? @Centril finally fixes #61495 cc @RalfJung
2019-12-23Fix typoOliver Scherer-1/+1
2019-12-23Document that calling Drop, even after it panics, is UBMark Rousskov-0/+6
2019-12-22Format the worldMark Rousskov-2460/+3109
2019-12-22Rollup merge of #67519 - Mark-Simulacrum:any-unsafe, r=CentrilMazdak Farrokhzad-0/+10
Document why Any is not an unsafe trait The added documentation is not public (i.e., not in a doc comment) but that seems appropriate for this sort of low-level detail. Fixes #62303
2019-12-22Rollup merge of #67506 - qnighy:remove-iter-private, r=Dylan-DPCMazdak Farrokhzad-17/+0
Remove iter_private.rs The contents of this file have been moved in #56932 (520e8b0) and the file should have been removed as well.
2019-12-22no longer promote non-pattern const functionsRalf Jung-3/+0
2019-12-22Document why Any is not an unsafe traitMark Rousskov-0/+10
2019-12-22Rename Result::unwrap_infallible to into_okMikhail Zabaluev-5/+5
2019-12-22libcore: test Result::unwrap_infallibleMikhail Zabaluev-0/+24
2019-12-22Add Result::unwrap_infallibleMikhail Zabaluev-0/+38
Implementation of https://github.com/rust-lang/rfcs/pull/2799
2019-12-22Rollup merge of #67480 - rossmacarthur:fix-41260-avoid-issue-0-part-2, r=CentrilMazdak Farrokhzad-87/+87
Require issue = "none" over issue = "0" in unstable attributes These changes make the use of `issue = "none"` required in unstable attributes throughout the compiler. Notes: - #66299 is now in beta so `issue = "none"` is accepted. - The `tidy` tool now fails on `issue = "0"`. - Tests that used `issue = "0"` were changed to use `issue = "none"`, except for _one_ that asserts `issue = "0"` can still be used. - The compiler still allows `issue = "0"` because some submodules require it, this could be disallowed once these are updated. Resolves #41260 r? @varkor
2019-12-21Rollup merge of #67490 - Mark-Simulacrum:i-67371, r=Dylan-DPCMazdak Farrokhzad-0/+5
Document privacy of RangeInclusive fields Fixes #67371
2019-12-21Rollup merge of #67420 - lzutao:_val, r=CentrilMazdak Farrokhzad-2/+1
use _val to ignore parameter of any::type_name_of_val mem::drop does the same thing too.
2019-12-21use _val to ignore parameter of any::type_name_of_valLzu Tao-2/+1
2019-12-21Document privacy of RangeInclusive fieldsMark Rousskov-0/+5
2019-12-21Rollup merge of #67478 - brunobell:master, r=CentrilMazdak Farrokhzad-1/+1
Fix src/libcore/str/mod.rs doc comments Fix grammar in src/libcore/str/mod.rs doc comments. r? @steveklabnik
2019-12-21Rollup merge of #67462 - DutchGhost:const_slice_from_raw_parts, r=dtolnayMazdak Farrokhzad-2/+18
Make ptr::slice_from_raw_parts a const fn available under a feature flag A first step in the direction of https://github.com/rust-lang/rust/issues/67456 . This makes `ptr::slice_from_raw_parts` and `ptr::slice_from_raw_parts_mut` available as a const fn under a feature flag.
2019-12-21Require issue = "none" over issue = "0" in unstable attributesRoss MacArthur-87/+87
2019-12-21Fix src/libcore/str/mod.rs doc commentsBroono Lu-1/+1
2019-12-21Remove iter_private.rsMasaki Hara-17/+0
The contents of this file have been moved in #56932 (520e8b0) and the file should have been removed as well.
2019-12-21Add a big notice about const intrinsicsOliver Scherer-0/+16
2019-12-20Require const stability attributes on intrinsics to be able to use them in ↵Oliver Scherer-1/+31
constant contexts
2019-12-20Rollup merge of #67163 - TheSamsa:split-up-ptr-mod, r=Mark-SimulacrumMazdak Farrokhzad-1691/+1685
Split up ptr/mod.rs in libcore... ...one with implementation detail for const ptr and the other with mut ptr I am not sure if the "stable since 1.0.0" flags are the correct choice for the two additional mods. Also, is it necessary for them to be "pub"? If so, there should be a good description for them. Closes #66891
2019-12-20Make ptr::slice_from_raw_parts a const fn available under a feature flagDodo-2/+18
2019-12-19Rollup merge of #67436 - NieDzejkob:todo-stabilization-fix, r=alexcrichtonMark Rousskov-1/+1
Correct the todo! stabilization version None
2019-12-19Rollup merge of #67253 - elichai:2019-12-fmt, r=Dylan-DPCMark Rousskov-44/+76
Add more delegations to the fmt docs and add doctests HI, this is a continuation to #67021 I replaced the `Debug` example with one that use the `Debug*` helpers so that padding etc will work too. I also added asserts for the doctests as @RalfJung asked :) The only thing I left with the `write!` macro is the `Display` example as I didn't know if there's a better way to do that. r? @QuietMisdreavus
2019-12-19Correct the todo! stabilization versionJakub Kądziołka-1/+1
2019-12-19doc: minus (U+2212) instead of dash (U+002D) for negative infinityTrevor Spiteri-2/+2
2019-12-19Split up ptr/mod.rs in libcore, one with implementation detail for const ptr ↵Christoph Schmidler-1691/+1685
and the other with mut ptr
2019-12-18Propagate cfg bootstrapMark Rousskov-513/+159
2019-12-16Rollup merge of #67349 - petertodd:2019-unsize-docs, r=CentrilMazdak Farrokhzad-1/+1
Minor: update Unsize docs for dyn syntax
2019-12-16Rollup merge of #67322 - lzutao:nonzero-use-self, r=joshtriplettMazdak Farrokhzad-3/+3
use Self alias in place of macros
2019-12-16Rollup merge of #67249 - ranma42:improve-starts-with-literal-char, r=BurntSushiMazdak Farrokhzad-15/+48
Improve code generated for `starts_with(<literal char>)` This PR includes two minor improvements to the code generated when checking for string prefix/suffix. The first commit simplifies the str/str operation, by taking advantage of the raw UTF-8 representation. The second commit replaces the current str/char matching logic with a char->str encoding and then the previous method. The resulting code should be equivalent in the generic case (one char is being encoded versus one char being decoded), but it becomes easy to optimize in the case of a literal char, which in most cases a developer might expect to be at least as simple as that of a literal string. This PR should fix #41993
2019-12-16Add benchmarks for `start_with` and `ends_with`Andrea Canciani-0/+44
2019-12-16Minor: update Unsize docs for dyn syntaxPeter Todd-1/+1
2019-12-16Rollup merge of #67317 - lcnr:type_name_docs, r=jonas-schievinkMazdak Farrokhzad-1/+1
fix type_name_of_val doc comment .
2019-12-16Rollup merge of #66771 - SimonSapin:panic-stability, r=KodrAusMazdak Farrokhzad-8/+10
Stabilize the `core::panic` module `std::panic` is already stable. `core::panic::PanicInfo` and `core::panic::Location` are stable and can be used through that path because of a bug in stability checking: #15702
2019-12-16Rollup merge of #66735 - SOF3:feature/str_strip, r=KodrAusMazdak Farrokhzad-1/+72
Add str::strip_prefix and str::strip_suffix Introduces a counterpart for `Path::strip_prefix` on `str`. This was also discussed in https://internals.rust-lang.org/t/pre-pr-path-strip-prefix-counterpart-in-str/11364/.
2019-12-16Rollup merge of #66570 - lzutao:stabilize-result-map_or, r=Dylan-DPCMazdak Farrokhzad-2/+1
stabilize Result::map_or r? @SimonSapin Closes #66293
2019-12-15Replace prints in fmt docs with assertsElichai Turkel-38/+64
2019-12-15use Self alias in place of macrosLzu Tao-3/+3
2019-12-15fix doc commentlcnr/Bastian Kauschke-1/+1
2019-12-15Set tracking issue for str_stripSOFe-2/+2
2019-12-15Rollup merge of #67305 - kappa:patch-1, r=jonas-schievinkMazdak Farrokhzad-1/+1
Doc typo
2019-12-14Doc typoAlex Kapranoff-1/+1
2019-12-14Auto merge of #67224 - nikomatsakis:revert-stabilization-of-never-type, ↵bors-16/+108
r=centril Revert stabilization of never type Fixes https://github.com/rust-lang/rust/issues/66757 I decided to keep the separate `never-type-fallback` feature gate, but tried to otherwise revert https://github.com/rust-lang/rust/pull/65355. Seemed pretty clean. ( cc @Centril, author of #65355, you may want to check this over briefly )
2019-12-14Revert "Stabilize the `never_type`, written `!`."Niko Matsakis-10/+10
This reverts commit 15c30ddd69d6cc3fffe6d304c6dc968a5ed046f1.
2019-12-14Revert "Redefine `core::convert::Infallible` as `!`."Niko Matsakis-7/+99
This reverts commit 089229a1935fa9795cfdefa518c8f8c3beb66db8.
2019-12-14Auto merge of #67136 - oli-obk:const_stability, r=Centrilbors-24/+463
Require stable/unstable annotations for the constness of all stable fns with a const modifier r? @RalfJung @Centril Every `#[stable]` const fn now needs either a `#[rustc_const_unstable]` attribute or a `#[rustc_const_stable]` attribute. You can't silently stabilize the constness of a function anymore.