about summary refs log tree commit diff
path: root/src/libcore
AgeCommit message (Collapse)AuthorLines
2019-08-02Fix typos in doc comments.Bruce Mitchener-4/+4
2019-08-01More questionmarks in doctestsAndre Bogus-16/+27
2019-08-01FixedSizeArray: Add missing links in doc comments.Bruce Mitchener-1/+4
2019-08-01Fix doc testsksqsf-17/+17
2019-08-01Revert "cloned/copied"ksqsf-140/+4
This reverts commit 6c130817623426697d8ebdf5d505487bd11ee2f6.
2019-08-01Rename {copied,cloned} to {copied,cloned}_ok, and add {copied,cloned} to ↵ksqsf-4/+140
copy/clone both Ok and Err
2019-07-31Remove derives `Encodable`/`Decodable` and unstabilize attribute `#[bench]`Vadim Petrochenkov-28/+3
2019-08-01Make these methods publicksqsf-8/+8
2019-08-01Fix issue and implksqsf-9/+9
2019-08-01Add Result::cloned{,_err} and Result::copied{,_err}ksqsf-0/+160
2019-07-30Rollup merge of #63123 - TankhouseAle:const-fn-type-name-any, r=oli-obkMazdak Farrokhzad-1/+2
`const fn`-ify `std::any::type_name` as laid out in #63084 A test, based on the one I added when I implemented support for the underlying `core::intrinsics::type_name` being allowed in `const fn` contexts, is included.
2019-07-30fix testsArtyom Pavlov-0/+2
2019-07-30mark div_duration methods as unstable, update tracking issueArtyom Pavlov-2/+2
2019-07-30Allow 'incomplete_features' in libcore/alloc.Mazdak Farrokhzad-0/+1
2019-07-30Rollup merge of #63108 - lzutao:option-xor-typo, r=jonas-schievinkMazdak Farrokhzad-2/+2
Add links to None in Option doc r? @jonas-schievink
2019-07-30Rollup merge of #63000 - max-sixty:chars-display, r=alexcrichtonMazdak Farrokhzad-1/+11
Impl Debug for Chars Closes https://github.com/rust-lang/rust/issues/62947, making `Debug` more consistent with the struct's output and purpose Let me know any feedback!
2019-07-30Rollup merge of #61965 - phil-opp:patch-4, r=scottmcmMazdak Farrokhzad-2/+2
Remove mentions of removed `offset_to` method from `align_offset` docs The `offset_to` method was deleted in https://github.com/rust-lang/rust/pull/52814. The replacement for the removed method is `wrapping_offset_from`. However, neither method takes an `usize` as argument, so I don't think that it makes sense to mention them.
2019-07-29Add the necessary changes to any.rsTankhouseAle-1/+2
Specifically the `#[rustc_const_unstable(feature = "const_type_name")]` attribute, as well as marking the actual function as `const`.
2019-07-29Wrap promoted generator fields in MaybeUninitTyler Mandry-0/+2
This prevents uninhabited fields from "infecting" the abi and largest_niche of the generator layout. This fixes a latent bug, where an uninhabited field could be promoted to the generator prefix and cause the entire generator to become uninhabited.
2019-07-29comments from @lzutaoMaximilian Roos-1/+1
2019-07-29impl Debug for CharsMaximilian Roos-1/+11
2019-07-29Add links to None in Option docLzu Tao-2/+2
2019-07-29Use internal iteration in the Sum and Product impls of Result and OptionTim Vermeulen-119/+67
2019-07-28Auto merge of #63090 - Centril:rollup-xnjwm2h, r=Centrilbors-0/+2
Rollup of 8 pull requests Successful merges: - #61856 (Lint attributes on function arguments) - #62360 (Document that ManuallyDrop::drop should not called more than once) - #62392 (Update minifier-rs version) - #62871 (Explicit error message for async recursion.) - #62995 (Avoid ICE when suggestion span is at Eof) - #63053 (SystemTime docs: recommend Instant for elapsed time) - #63081 (tidy: Cleanup the directory whitelist) - #63088 (Remove anonymous_parameters from unrelated test) Failed merges: r? @ghost
2019-07-28Rollup merge of #62360 - Aaron1011:patch-2, r=RalfJungMazdak Farrokhzad-0/+2
Document that ManuallyDrop::drop should not called more than once Double dropping is unsound (e.g. https://github.com/rust-lang/rust/issues/60977). This commit documents the fact that `ManuallyDrop::drop` should not be called multiple times on the same instance, as it might not be immediately obvious that this counts as a use of uninitialized data.
2019-07-28Fix `cfg(parallel_compiler)` modeVadim Petrochenkov-2/+2
Fix rebase
2019-07-28Deny `unused_lifetimes` through rustbuildVadim Petrochenkov-7/+7
2019-07-28Remove lint annotations in specific crates that are already enforced by ↵Vadim Petrochenkov-3/+0
rustbuild Remove some random unnecessary lint `allow`s
2019-07-28Rollup merge of #62806 - mati865:clippy, r=TimNNMazdak Farrokhzad-4/+4
Fix few Clippy warnings
2019-07-28Rollup merge of #62883 - Stargateur:refactoring-adapters, r=scottmcmMazdak Farrokhzad-210/+141
Refactoring use common code between option, result and accum `Option` and `Result` have almost exactly the same code that in `accum.rs` that implement `Sum` and `Product`. This PR just move some code to use the same code for all of them. I believe is better to not implement this `Iterator` feature twice. I'm not very familiar with pub visibility hope I didn't make then public. However, maybe these adapters could be useful and we could think to make then pub. #59605 #11084 r? @pnkfelix
2019-07-28Rollup merge of #62074 - wizAmit:feature/mut_chunks_nth_back, r=scottmcmMazdak Farrokhzad-0/+41
squash of all commits for nth_back on ChunksMut wip nth_back for chunks_mut working chunksmut fixed nth_back for chunksmut Signed-off-by: wizAmit <amitforfriends_dns@yahoo.com> r? @timvermeulen r? @scottmcm
2019-07-27Update wordingAaron Hill-1/+2
2019-07-27Remove run-pass test suitesVadim Petrochenkov-1/+1
2019-07-27Auto merge of #62748 - luca-barbieri:optimize-refcell-borrow, r=RalfJungbors-5/+15
Optimize RefCell read borrowing Instead of doing two comparisons we can do only one with a bit of cleverness. LLVM currently can't do this optimization itself on x86-64.
2019-07-27Refactoring use commun code between option, result and accumStargateur-210/+141
2019-07-26Auto merge of #62086 - petrochenkov:builtout, r=eddybbors-8/+55
Define built-in macros through libcore This PR defines built-in macros through libcore using a scheme similar to lang items (attribute `#[rustc_builtin_macro]`). All the macro properties (stability, visibility, etc.) are taken from the source code in libcore, with exception of the expander function transforming input tokens/AST into output tokens/AST, which is still provided by the compiler. The macros are made available to user code through the standard library prelude (`{core,std}::prelude::v1`), so they are still always in scope. As a result **built-in macros now have stable absolute addresses in the library**, like `core::prelude::v1::line!()`, this is an insta-stable change. Right now `prelude::v1` is the only publicly available absolute address for these macros, but eventually they can be moved into more appropriate locations with library team approval (e.g. `Clone` derive -> `core::clone::Clone`). Now when built-in macros have canonical definitions they can be imported or reexported without issues (https://github.com/rust-lang/rust/issues/61687). Other changes: - You can now define a derive macro with a name matching one of the built-in derives (https://github.com/rust-lang/rust/issues/52269). This was an artificial restriction that could be worked around with import renaming anyway. Known regressions: - Empty library crate with a crate-level `#![test]` attribute no longer compiles without `--test`. Previously it didn't compile *with* `--test` or with the bin crate type. Fixes https://github.com/rust-lang/rust/issues/61687 Fixes https://github.com/rust-lang/rust/issues/61804 r? @eddyb
2019-07-26Rollup merge of #63009 - Rosto75:master, r=matkladMazdak Farrokhzad-1/+1
Remove redundant `mut` from variable declaration.
2019-07-26Rollup merge of #62583 - sfackler:unpin-raw, r=cramertjMazdak Farrokhzad-0/+6
Implement Unpin for all raw pointers Like references and boxes, moving the pointer doesn't move the pointed-to value, so this is safe. r? @cramertj
2019-07-26Rollup merge of #62421 - JohnTitor:U007D-master, r=alexcrichtonMazdak Farrokhzad-56/+241
Introduce `as_deref` to Option This is re-submission for #59628. Renames `deref()` to `as_deref()` and adds `deref_mut()` impls and tests. CC #50264 r? @Kimundi (I picked you as you're the previous reviewer.)
2019-07-26Rollup merge of #62120 - GuillaumeGomez:add-missing-type-links, r=CentrilMazdak Farrokhzad-63/+81
Add missing type links in documentation r? @rust-lang/docs
2019-07-26Rollup merge of #62084 - euclio:unicode-table-tweak, r=kennytmMazdak Farrokhzad-2/+2
allow clippy::unreadable_literal in unicode tables Also modifies the generation script to emit 2018 edition paths.
2019-07-26Remove redundant `mut` from variable declaration.Tomasz Różański-1/+1
2019-07-26Introduce built-in macros through libcoreVadim Petrochenkov-8/+55
2019-07-25Auto merge of #62990 - Centril:rollup-k9n0hvs, r=Centrilbors-474/+301
Rollup of 15 pull requests Successful merges: - #60066 (Stabilize the type_name intrinsic in core::any) - #60938 (rustdoc: make #[doc(include)] relative to the containing file) - #61884 (Stablize Euclidean Modulo (feature euclidean_division)) - #61890 (Fix some sanity checks) - #62528 (Add joining slices of slices with a slice separator, not just a single item) - #62707 (Add tests for overlapping explicitly dropped locals in generators) - #62735 (Turn `#[global_allocator]` into a regular attribute macro) - #62822 (Improve some pointer-related documentation) - #62887 (Make the parser TokenStream more resilient after mismatched delimiter recovery) - #62921 (Add method disambiguation help for trait implementation) - #62930 (Add test for #51559) - #62942 (Use match ergonomics in Condvar documentation) - #62977 (Fix inconsistent highlight blocks.) - #62978 (Remove `cfg(bootstrap)` code for array implementations) - #62981 (Add note suggesting to borrow a String argument to find) Failed merges: - #62964 (clarify and unify some type test names) r? @ghost
2019-07-25Rollup merge of #62981 - estebank:issue-62843, r=CentrilMazdak Farrokhzad-0/+4
Add note suggesting to borrow a String argument to find Fix #62843.
2019-07-25Rollup merge of #62978 - LukasKalbertodt:remove-array-impl-bootstrap-cfg, ↵Mazdak Farrokhzad-434/+241
r=Mark-Simulacrum Remove `cfg(bootstrap)` code for array implementations In https://github.com/rust-lang/rust/pull/62435 ("Use const generics for array impls [part 1]") the old macro-based implementations were not removed but still used with `cfg(bootstrap)` since the bootstrap compiler had some problems with const generics at the time. This does not seem to be the case anymore, so there is no reason to keep the old code. Unfortunately, the diff is pretty ugly because much of the code was indented by one level before. The change is pretty trivial, though. PS: I did not run the full test suite locally. There are 40°C outside and 31°C inside my room. I don't want my notebook to melt. I hope that CI is green. r? @scottmcm
2019-07-25Rollup merge of #62977 - Rosto75:master, r=shepmasterMazdak Farrokhzad-7/+7
Fix inconsistent highlight blocks.
2019-07-25Rollup merge of #62735 - petrochenkov:galloc, r=alexcrichtonMazdak Farrokhzad-0/+7
Turn `#[global_allocator]` into a regular attribute macro It was a 99% macro with exception of some diagnostic details. As a result of the change, `#[global_allocator]` now works in nested modules and even in nameless blocks. Fixes https://github.com/rust-lang/rust/issues/44113 Fixes https://github.com/rust-lang/rust/issues/58072
2019-07-25Rollup merge of #61884 - crlf0710:stablize_euc, r=dtolnay,CentrilMazdak Farrokhzad-33/+16
Stablize Euclidean Modulo (feature euclidean_division) Closes #49048
2019-07-25Rollup merge of #60066 - sfackler:type-name, r=CentrilMazdak Farrokhzad-0/+26
Stabilize the type_name intrinsic in core::any Stabilize `type_name` in `core::any`. Closes rust-lang/rfcs#1428 FCP completed over there. `RELEASES.md`: Prefer T-libs for categorization.