about summary refs log tree commit diff
path: root/src/libcore
AgeCommit message (Collapse)AuthorLines
2019-01-06Derive Clone for ArgumentV1Shotaro Yamada-9/+1
manual impl was a workaround for #28229.
2019-01-06Remove unnecessary adapterShotaro Yamada-23/+2
2019-01-05Fix compile errorCorey Farwell-1/+1
2019-01-05Cleanup PartialEq docs.Corey Farwell-47/+9
- Cleanup the `impl PartialEq<BookFormat> for Book` implementation - Implement `impl PartialEq<Book> for BookFormat` so it’s symmetric - Fixes https://github.com/rust-lang/rust/issues/53844. - Removes the last example since it appears to be redundant with the previous two examples.
2019-01-05Auto merge of #57354 - kennytm:rollup, r=kennytmbors-8/+9
Rollup of 17 pull requests Successful merges: - #57219 (Remove some unused code) - #57229 (Fix #56806 by using `delay_span_bug` in object safety layout sanity checks) - #57233 (Rename and fix nolink-with-link-args test) - #57238 (Fix backtraces for inlined functions on Windows) - #57249 (Fix broken links to second edition TRPL.) - #57267 (src/jemalloc is gone, remove its mention from COPYRIGHT) - #57273 (Update the stdsimd submodule) - #57278 (Add Clippy to config.toml.example) - #57295 (Fix 'be be' constructs) - #57311 (VaList::copy should not require a mutable ref) - #57312 (`const fn` is no longer coming soon (const keyword docs)) - #57313 (Improve Box<T> -> Pin<Box<T>> conversion) - #57314 (Fix repeated word typos) - #57326 (Doc rewording, use the same name `writer`) - #57338 (rustdoc: force binary filename for compiled doctests) - #57342 (librustc_mir: Make qualify_min_const_fn module public) - #57343 (Calculate privacy access only via query) Failed merges: - #57340 (Use correct tracking issue for c_variadic) r? @ghost
2019-01-05Rollup merge of #57311 - dlrobertson:fix_valist_copy, r=KodrAuskennytm-1/+1
VaList::copy should not require a mutable ref `VaList::copy` does not need to take a mutable reference. The `va_copy` intrinsic takes a immutable reference.
2019-01-05Rollup merge of #57273 - alexcrichton:update-stdsimd, r=nikomatsakiskennytm-0/+1
Update the stdsimd submodule Add a new cmpxchg16b intrinsics for x86_64 and some corrections for ARM/AArch64
2019-01-05Rollup merge of #57249 - frewsxcv:frewsxcv-second-edition, r=KodrAuskennytm-7/+7
Fix broken links to second edition TRPL. Fixes https://github.com/rust-lang/rust/issues/57104. Remove `second-edition/` from TRPL hyperlinks.
2019-01-05Auto merge of #57145 - RalfJung:panic-if-uninhabited, r=alexcrichtonbors-0/+11
panic when calling MaybeUninhabited::into_inner on uninhabited type I do this by adding an internal-only intrinsic `panic_if_uninhabited`. I have no idea what I am doing here, just mindlessly copying code around, so please review carefully!
2019-01-05Show suggestion to use .char().nth() and link to The Book on unimplemented ↵folex-0/+30
Index trait
2019-01-04stabilize convert::identityMazdak Farrokhzad-4/+1
2019-01-03VaList::copy should not require a mutable refDan Robertson-1/+1
VaList::copy does not need to take a mutable reference. The va_copy intrinsic takes a immutable reference.
2019-01-02Update the stdsimd submoduleAlex Crichton-0/+1
Add a new cmpxchg16b intrinsics for x86_64!
2019-01-01Auto merge of #57125 - doitian:inconsistent-clone-doc, r=blussbors-9/+20
Fix inconsistent Clone documentation. Now, arrays of any size Clone if the element type is Clone. So remove the the document that uses this as an example. refs #57123
2019-01-01Fix broken links to second edition TRPL.Corey Farwell-7/+7
Fixes https://github.com/rust-lang/rust/issues/57104.
2018-12-31const-stabilize const_int_ops + reverse_bitsMazdak Farrokhzad-26/+41
2018-12-31Fix inconsistent Clone documentation.ian-9/+20
Use function pointer as the example to demonstrate how to implement Clone for Copy types. refs #57123
2018-12-31now that some intrisics are safe, use that fact.Mazdak Farrokhzad-0/+24
2018-12-31stabilize const_int_signMazdak Farrokhzad-3/+0
2018-12-31stabilize const_int_rotateMazdak Farrokhzad-5/+5
2018-12-31stabilize const_int_wrapping.Mazdak Farrokhzad-11/+10
2018-12-30Auto merge of #57204 - czipperz:ord_docs_must_agree, r=sfacklerbors-3/+5
Make std::cmp::Ord documentation specify what it means to agree with ParitalEq Resolves #57157
2018-12-29Specify criterion for PartialOrdCzipperz-2/+3
2018-12-29Make std::cmp::Ord documentation specify what it means to agree with PartialEqCzipperz-3/+4
2018-12-29Rollup merge of #57168 - kennytm:fix-unaligned-docs, r=rkruppekennytm-2/+2
Removed aligned ZST requirement from docs of read_/write_unaligned. This is just a copy-paste error.
2018-12-29Rollup merge of #57149 - rust-lang:sgrif-patch-1, r=rkruppekennytm-1/+1
Fix typo in pin documentation Affect is a verb, effect is a noun
2018-12-28Removed aligned ZST requirement from docs of read_/write_unaligned.kennytm-2/+2
This is just a copy-paste error.
2018-12-28Make the getter for NonZero types into a const fndylan_DPC-1/+1
2018-12-27Fix typo in pin documentationSean Griffin-1/+1
Affect is a verb, effect is a noun
2018-12-27panic when calling MaybeUninhabited::into_inner on uninhabited typeRalf Jung-0/+11
2018-12-27Auto merge of #57133 - SimonSapin:zero, r=oli-obkbors-44/+21
Remove the private generic NonZero<T> wrapper type Instead, use `#[rustc_layout_scalar_valid_range_start(1)]` directly on relevant libcore types.
2018-12-26Auto merge of #57124 - sunjay:stable_duration_as_u128, r=Centrilbors-6/+3
Stabilize Duration::{as_millis, as_micros, as_nanos} Fixes #50202. :tada: This is the stabilization PR for the `duration_as_u128` feature. I have never made one of these before so please let me know if I missed a step. I followed the [guide in the Rust Forge](https://forge.rust-lang.org/stabilization-guide.html) and also found some old stabilization PRs ([1](https://github.com/rust-lang/rust/pull/57002), [2](https://github.com/rust-lang/rust/pull/56207)) for similar features to base my work on.
2018-12-26modify remaining #[must_use[ messagesMatthias Krüger-5/+5
2018-12-26Remove the private generic NonZero<T> wrapper type.Simon Sapin-44/+21
Instead, use `#[rustc_layout_scalar_valid_range_start(1)]` directly on relevant libcore types.
2018-12-26Auto merge of #56534 - xfix:copied, r=@SimonSapinbors-1/+212
Add unstable Iterator::copied() Initially suggested at https://github.com/bluss/rust-itertools/pull/289, however the maintainers of itertools suggested this may be better of in a standard library. The intent of `copied` is to avoid accidentally cloning iterator elements after doing a code refactoring which causes a structure to be no longer `Copy`. This is a relatively common pattern, as it can be seen by calling `rg --pcre2 '[.]map[(][|](?:(\w+)[|] [*]\1|&(\w+)[|] \2)[)]'` on Rust main repository. Additionally, many uses of `cloned` actually want to simply `Copy`, and changing something to be no longer copyable may introduce unnoticeable performance penalty. Also, this makes sense because the standard library includes `[T].copy_from_slice` to pair with `[T].clone_from_slice`. This also adds `Option::copied`, because it makes sense to pair it with `Iterator::copied`. I don't think this feature is particularly important, but it makes sense to update `Option` along with `Iterator` for consistency.
2018-12-26Stabilize duration_as_u128Sunjay Varma-6/+3
2018-12-26Update src/libcore/str/mod.rs, tweak must_use message Zack M. Davis-1/+1
trimmed string is returned as a slice instead of a new allocation Co-Authored-By: matthiaskrgr <matthias.krueger@famsik.de>
2018-12-26mark str::string::String.trim.* functions as #[must_use].Matthias Krüger-0/+12
The functions return a reference to a new object and do not modify in-place as the following code shows: ```` let s = String::from(" hello "); s.trim(); assert_eq!(s, " hello "); ```` The new reference should be bound to a variable as now indicated by #[must_use].
2018-12-26Add a tracking issue for Iterator::copiedKonrad Borowski-7/+7
2018-12-26Add a tracking issue for Option::copiedKonrad Borowski-2/+2
2018-12-25Remove licensesMark Rousskov-1748/+1
2018-12-25Auto merge of #56926 - alexcrichton:update-stdsimd, r=TimNNbors-0/+1
Update the stdsimd submodule This brings in a few updates: * Update wasm intrinsic naming for atomics * Update and reimplement most simd128 wasm intrinsics * Other misc improvements here and there, including a small start to AVX-512 intrinsics
2018-12-24Rollup merge of #56242 - GuillaumeGomez:iterator-missing-link, r=CentrilMazdak Farrokhzad-1/+1
Add missing link in docs r? @steveklabnik
2018-12-23Rollup merge of #56939 - cramertj:pin-stabilization, r=alexcrichtonMazdak Farrokhzad-55/+47
Pin stabilization This implements the changes suggested in https://github.com/rust-lang/rust/issues/55766#issue-378417538 and stabilizes the `pin` feature. @alexcrichton also listed several "blockers" in that issue, but then in [this comment](https://github.com/rust-lang/rust/issues/55766#issuecomment-445074980) mentioned that they're more "TODO items": > In that vein I think it's fine for a stabilization PR to be posted at any time now with FCP lapsed for a week or so now. The final points about self/pin/pinned can be briefly discussed there (if even necessary, they could be left as the proposal above). Let's settle these last bits here and get this thing stabilized! :) r? @alexcrichton cc @withoutboats
2018-12-23Merge branch 'master' into copiedKonrad Borowski-333/+600
2018-12-23Improve docs for collecting into `Option`sPascal Hertleif-9/+31
Changes the original example to use more idiomatic formatting as well as `.checked_add`. Also adds a second example to show a case where the `.collect` returns `None`.
2018-12-23Rollup merge of #56970 - Firstyear:mem_uninit_doc_ptr_drop, r=Manishearthkennytm-0/+39
Mem uninit doc ptr drop Extend the mem::uninitialized documentation to account for partially initialized arrays and how to correctly handle these. These are used in some datastructures (trees for example) or in FFI. r? @Manishearth
2018-12-23Rollup merge of #56941 - euclio:deny-libstd-resolution-failures, ↵kennytm-0/+6
r=QuietMisdreavus deny intra-doc link resolution failures in libstd Fixes #56693. Until we land a fix for the underlying issue (#56922), we can at least fix the failures in libstd so they don't propagate to downstream crates.
2018-12-23Rollup merge of #56936 - ubsan:euclidean_div_rem, r=dtolnaykennytm-91/+113
rename div_euc -> div_euclid, and mod_euc -> rem_euclid logic is written up in #49048 Also, update the documentation slightly. cc @alexcrichton @clarcharr @varkor
2018-12-23Rollup merge of #56802 - clarcharr:nth_back, r=alexcrichtonkennytm-6/+107
Add DoubleEndedIterator::nth_back As suggested by #54054. This doesn't fix that issue, as this doesn't add enough implementations to optimise that specific use case, but it adds the method and a few (relatively) trivial overrides to work as an initial implementation. It's probably going to be a lot of work adding `nth_back` implementations everywhere, and I don't have the time to include it all in this commit. But, it's a start. :)