about summary refs log tree commit diff
path: root/src/libcore
AgeCommit message (Collapse)AuthorLines
2019-03-11consistent naming for duration_float methods and additional f32 methodsnewpavlov-9/+121
2019-03-11Improvements to comments in libstd, libcore, liballoc.Alexander Regueiro-24/+27
2019-03-10we can now skip should_panic tests with the libtest harnessRalf Jung-34/+0
2019-03-09Use lifetime contravariance to elide more lifetimes in core+alloc+stdScott McMurray-39/+39
2019-03-09Revert "Revert "Add clamp functions""Dirk Leifeld-0/+26
2019-03-09Rollup merge of #58924 - cuviper:more-as_slice, r=dtolnayMazdak Farrokhzad-0/+28
Add as_slice() to slice::IterMut and vec::Drain In bluss/indexmap#88, we found that there was no easy way to implement `Debug` for our `IterMut` and `Drain` iterators. Those are built on `slice::IterMut` and `vec::Drain`, which implement `Debug` themselves, but have no other way to access their data. With a new `as_slice()` method, we can read the data and customize its presentation.
2019-03-09Rollup merge of #58750 - TimDiekmann:master, r=oli-obkMazdak Farrokhzad-3/+5
Make `Unique::as_ptr`, `NonNull::dangling` and `NonNull::cast` const
2019-03-09Rollup merge of #58660 - RalfJung:maybe-uninit, r=CentrilMazdak Farrokhzad-30/+229
MaybeUninit: add read_initialized, add examples This adds a new `read_initialized` method, similar to suggestions by @Amanieu and @shepmaster. I also added examples to this and other methods.
2019-03-09Auto merge of #57882 - euclio:unused-doc-attributes, r=estebankbors-1/+1
overhaul unused doc comments lint This PR contains a number of improvements to the `unused_doc_comments` lint. - Extends the span to cover the entire comment when using sugared doc comments. - Triggers the lint for all unused doc comments on a node, instead of just the first one. - Triggers the lint on macro expansions, and provides a help note explaining that doc comments must be expanded by the macro. - Adds a label pointing at the node that cannot be documented. Furthermore, this PR fixes any instances in rustc where a macro expansion was erroneously documented.
2019-03-08expand unused doc comment diagnosticAndy Russell-1/+1
Report the diagnostic on macro expansions, and add a label indicating why the comment is unused.
2019-03-08Fix documentation of from_ne_bytes and from_le_bytesNagy Tibor-8/+8
2019-03-06Apply suggestions from code reviewRalf Jung-1/+1
2019-03-06Apply suggestions from code reviewMazdak Farrokhzad-3/+3
Co-Authored-By: RalfJung <post@ralfj.de>
2019-03-06Implement `iter::Sum` and `iter::Product` for `Option`John Downey-0/+129
This is similar to the existing implementation for `Result`. It will take each item into the accumulator unless a `None` is returned.
2019-03-05Add a tracking issue for new as_slice methodsJosh Stone-1/+1
2019-03-05Clean up the example on slice::IterMut::as_slice()Josh Stone-6/+2
2019-03-05Apply suggestions from code reviewMazdak Farrokhzad-4/+4
Co-Authored-By: cuviper <cuviper@gmail.com>
2019-03-05Fix a tiny error in documentation of std::pin.Taeguk Kwon-1/+1
2019-03-05core: ensure VaList passes improper_ctypes lintDan Robertson-7/+7
Ensure the core::ffi::VaList structure passes the improper_ctypes lint.
2019-03-04Add as_slice() to slice::IterMut and vec::DrainJosh Stone-0/+32
In bluss/indexmap#88, we found that there was no easy way to implement `Debug` for our `IterMut` and `Drain` iterators. Those are built on `slice::IterMut` and `vec::Drain`, which implement `Debug` themselves, but have no other way to access their data. With a new `as_slice()` method, we can read the data and customize its presentation.
2019-03-03Remove stray ` in the documentation for the FromIterator implementation for ↵Alexandra V-1/+1
Option
2019-03-03Auto merge of #58866 - kennytm:rollup, r=kennytmbors-36/+49
Rollup of 14 pull requests Successful merges: - #58730 (Have all methods of Filter and FilterMap use internal iteration) - #58780 (ManuallyDrop != MaybeUninit) - #58782 (Replace `s` with `self` in docs for str methods taking self.) - #58785 (allow specifying attributes for tool lints) - #58802 (Ensure `record_layout_for_printing()` is inlined.) - #58821 (Fixed a syntax error in the pin docs) - #58830 (tidy: deny(rust_2018_idioms)) - #58832 (Revert switching to GCP on AppVeyor) - #58833 (tools/rustbook: deny(rust_2018_idioms)) - #58835 (tools/remote-test-{client,server}: deny(rust_2018_idioms)) - #58838 (Fix typo in Vec#resize_with documentation) - #58842 (Forbid duplicating Cargo as a dependency) - #58852 (Update toolchain to build NetBSD release) - #58865 (Fix C-variadic function printing)
2019-03-02Bootstrap compiler update for 1.35 releaseMark Rousskov-122/+8
2019-03-02Rollup merge of #58821 - alex:patch-1, r=Centrilkennytm-1/+1
Fixed a syntax error in the pin docs
2019-03-02Rollup merge of #58782 - tspiteri:str-escape-self, r=kennytmkennytm-3/+3
Replace `s` with `self` in docs for str methods taking self. Cherry picked from PR #58596 which is blocked on some intra-doc link bugs.
2019-03-02Rollup merge of #58780 - RalfJung:manually-drop, r=nagisakennytm-0/+8
ManuallyDrop != MaybeUninit Cc @Centril
2019-03-02Rollup merge of #58730 - timvermeulen:internal_iteration, r=scottmcmkennytm-32/+37
Have all methods of Filter and FilterMap use internal iteration This PR changes `Filter::{next, next_back, count}` and `FilterMap::{next, next_back}` to all use internal iteration. The `next` and `next_back` methods are changed to directly forward to `try_for_each` and `try_rfold` respectively, using `Result` as the `Try` type. I think that's okay? Alternatively, I could change their implementations to use `LoopState` instead if there's any benefit in doing so. r? @scottmcm
2019-02-28Fixed a syntax error in the pin docsAlex Gaynor-1/+1
2019-02-28fixed tests againMarcel Hellwig-14/+12
2019-02-28add feature flag to testMarcel Hellwig-0/+1
2019-02-28Update src/libcore/mem.rsMazdak Farrokhzad-1/+1
Co-Authored-By: RalfJung <post@ralfj.de>
2019-02-28fixed nonzero testsMarcel Hellwig-4/+3
2019-02-28Make `Unique::as_ptr`, `NonNull::dangling` and `NonNull::cast` constTim-3/+5
Make `Unique::as_ptr` const without feature attribute as it's unstable Make `NonNull::dangling` and `NonNull::cast` const with `feature = "const_ptr_nonnull"`
2019-02-27improve readabilityRalf Jung-1/+1
2019-02-27replaced nonzeroparseerror with regular interrorMarcel Hellwig-99/+23
2019-02-27Replace `s` with `self` in docs for str methods taking self.Trevor Spiteri-3/+3
2019-02-27Vastly simplify TryFrom docs.Simon Heath-28/+8
2019-02-27Incorporated review changes.Simon Heath-17/+35
2019-02-27Slowly figuring out how rustdoc actually works.Simon Heath-0/+3
Unfortunately trying to run doctests on my local machine is not really faster than letting Travis do it...
2019-02-27Fix some links in TryFrom docs.Simon Heath-7/+15
2019-02-27Fix a bunch of heckin' trailing whitespaceSimon Heath-17/+17
2019-02-27Add basic docs to integer TryFrom impl macros.Simon Heath-0/+16
They're not as good as `From` 'cause they don't stringify the types and generate examples and so on, but it's a start.
2019-02-27Started expanding docs for `TryFrom` and `TryInto`.Simon Heath-1/+43
The examples are still lacking for now, both for module docs and for methods/impl's.
2019-02-27ManuallyDrop != MaybeUninitRalf Jung-0/+8
2019-02-27Remove copy paste error in char testsOliver Middleton-1/+1
Co-Authored-By: xfix <konrad@borowski.pw>
2019-02-27Implement ExactSizeIterator for ToLowercase and ToUppercaseKonrad Borowski-0/+26
2019-02-27Add trailing newlineTim Vermeulen-1/+1
2019-02-27Improve existing benchmarks to prevent extreme optimizationsTim Vermeulen-2/+2
2019-02-27Add relevant benchmarksTim Vermeulen-0/+28
2019-02-26Clarify `rotate_{left,right}` docsTobias Bucher-6/+8
I wondered what the `<<!` operator is although the exclamation mark was only the end of the sentence.