about summary refs log tree commit diff
path: root/src/libcore
AgeCommit message (Collapse)AuthorLines
2018-09-14Auto merge of #54032 - oli-obk:layout_scalar_ranges, r=eddybbors-1/+2
Add forever unstable attribute to allow specifying arbitrary scalar ranges r? @eddyb for the first commit and @nikomatsakis for the second one
2018-09-14Rollup merge of #53218 - weiznich:feature/option_ref_into, r=KodrAuskennytm-0/+14
Add a implementation of `From` for converting `&'a Option<T>` into `Option<&'a T>` I'm not sure if any annotations regarding the stabilization are needed or in general what's the correct process of adding such an impl. cc @sgrif (We have talked about this)
2018-09-13add panics section to method docsArtyom Pavlov-0/+9
2018-09-13move checks to from_float_secsArtyom Pavlov-25/+15
2018-09-13remove trailing spacesArtyom Pavlov-2/+2
2018-09-13add as_float_secs and from_float_secs methods, refactor float methodsArtyom Pavlov-36/+55
2018-09-12fix testsArtyom Pavlov-3/+3
2018-09-12fix testsArtyom Pavlov-1/+4
2018-09-12Auto merge of #53793 - toidiu:ak-stabalize, r=nikomatsakisbors-1/+0
stabilize outlives requirements https://github.com/rust-lang/rust/issues/44493 r? @nikomatsakis
2018-09-12fix doctestsArtyom Pavlov-0/+6
2018-09-12more explicit implArtyom Pavlov-1/+1
2018-09-12remove newlineArtyom Pavlov-1/+0
2018-09-12Move float ops to unstable inherent methodsArtyom Pavlov-84/+83
2018-09-12Rollup merge of #53777 - ivanbakel:result_map_or_else, r=alexcrichtonkennytm-0/+30
Implemented map_or_else for Result<T, E> Fulfills #53268 The example is ripped from `Option::map_or_else`, with the types corrected.
2018-09-11stabalize infer outlives requirements (RFC 2093).toidiu-1/+0
Co-authored-by: nikomatsakis
2018-09-11Fix overflow in `from_raw_parts` size checkTobias Bucher-3/+5
2018-09-11Address attribute naming and use `Bound` enumOliver Schneider-1/+1
2018-09-11Get rid of the `non_zero` lang item in favour of arbitrary range specificationsOliver Schneider-1/+2
2018-09-10fix typosNicole Mazzuca-2/+2
2018-09-10A slice covering exactly half the address space is not OKTobias Bucher-6/+6
2018-09-08Document .0 to unpack the value from WrappingMartin Pool-0/+3
2018-09-08Auto merge of #51885 - GuillaumeGomez:trait-impl-show-docs, ↵bors-16/+8
r=Mark-Simulacrum,QuietMisdreavus Trait impl show docs Fixes #51834. <img width="1440" alt="screen shot 2018-06-29 at 00 14 33" src="https://user-images.githubusercontent.com/3050060/42063323-6e6e8cc8-7b31-11e8-88ef-4dd2229df76c.png"> (You can see both commit changes in the screenshot 😄) r? @QuietMisdreavus
2018-09-07Rollup merge of #53979 - ↵kennytm-3/+0
alexcrichton:remove-repr-transparent-atomics-master, r=sfackler Remove `#[repr(transparent)]` from atomics Added in #52149 the discussion in #53514 is showing how we may not want to actually add this attribute to the atomic types. While we continue to debate #53514 this commit reverts the addition of the `transparent` attribute. This should be a more conservative route which leaves us the ability to tweak this in the future but in the meantime allows us to continue discussion as well.
2018-09-07Rollup merge of #53946 - tbu-:pr_doc_manuallydrop, r=cramertjkennytm-2/+8
Clarify `ManuallyDrop` docs Mention that you can use `into_inner` to drop the contained value.
2018-09-07Rollup merge of #53455 - llogiq:num-byte-conversion-docs, r=steveklabnikkennytm-251/+314
Individual docs for {from,to}_*_bytes
2018-09-07Rollup merge of #53299 - MagnumOpus21:fix-macro-write, r=steveklabnikkennytm-0/+20
Updated core/macros.rs to note it works in a no_std environment. Fixes #45797 This PR updates the documentation of `write!` to note it works in a `no_std` environment, and adds an example to showcase this. In a `no_std` environment, the author of the code is responsible for the implementation of the `Write` trait. This example will work out of the box with `no_std`, but the implementation of `Write` is expected to be provided by the user. r? @steveklabnik
2018-09-06Fix invalid urlsGuillaume Gomez-16/+8
2018-09-05Auto merge of #52994 - varkor:trim_direction, r=alexcrichtonbors-13/+157
Add trim_start, trim_end etc.; deprecate trim_left, trim_right, etc. in future Adds the methods: `trim_start`, `trim_end`, `trim_start_matches` and `trim_end_matches`. Deprecates `trim_left`, `trim_right`, `trim_left_matches` and `trim_right_matches` starting from Rust 1.33.0, three versions from when they'll initially be marked as being deprecated, using the future deprecation from https://github.com/rust-lang/rust/issues/30785 and https://github.com/rust-lang/rust/pull/51681. Fixes https://github.com/rust-lang/rust/issues/30459.
2018-09-05Remove `#[repr(transparent)]` from atomicsAlex Crichton-3/+0
Added in #52149 the discussion in #53514 is showing how we may not want to actually add this attribute to the atomic types. While we continue to debate #53514 this commit reverts the addition of the `transparent` attribute. This should be a more conservative route which leaves us the ability to tweak this in the future but in the meantime allows us to continue discussion as well.
2018-09-05Individual docs for {from,to}_*_bytesAndre Bogus-251/+314
2018-09-05Spacing changes made to the exampleSiva Prasad-11/+10
2018-09-05Added a missing backtick to no stdMagnumOpus21-1/+1
2018-09-05Made the requested changes for Note: and no_std within backticksMagnumOpus21-2/+2
2018-09-05Prefixed no_run to the no_std write macroMagnumOpus21-1/+1
2018-09-05Formatting errors rectifiedMagnumOpus21-2/+7
2018-09-05Refined the exampleMagnumOpus21-22/+10
2018-09-05Updated libcore/macro.rs to note write macro can work in no_std setupsMagnumOpus21-0/+28
2018-09-04Breaking change upgradesMark Rousskov-11/+11
2018-09-04Clarify `ManuallyDrop` docsTobias Bucher-2/+8
Mention that you can use `into_inner` to drop the contained value.
2018-09-04Add `debug_assert!`s to `slice::from_raw_parts`Tobias Bucher-2/+11
Copy the documentation over to `slice::from_raw_parts_mut`.
2018-09-04Document that slices cannot be larger than `isize::MAX` bytesTobias Bucher-0/+4
Fixes #53676.
2018-09-04Auto merge of #53928 - tbu-:pr_doc_fromrawmut, r=frewsxcvbors-4/+7
Link to more detailed docs in `slice::from_raw_parts_mut`
2018-09-03Auto merge of #53697 - Cyres:const-fn-int-ops, r=oli-obkbors-56/+504
Add more const int ops r? @oli-obk Tracking Issue: #53718 list of `const fn`s in this PR: - `feature = const_int_rotate` - `rotate_left` - `rotate_right` - `feature = const_int_wrapping` - `wrapping_add` - `wrapping_sub` - `wrapping_mul` - `wrapping_shl` - `wrapping_shr` - `feature = const_int_overflowing` - `overflowing_add` - `overflowing_sub` - `overflowing_mul` - `overflowing_shl` - `overflowing_shr` - `feature = const_int_sign` - `is_positive` - `is_negative` - `feature = const_int_conversion` - `reverse_bits` - `to_le_bytes` - `to_ne_bytes` - `from_be_bytes` - `from_le_bytes` - `from_ne_bytes` - `reverse_bits`
2018-09-03Link to more detailed docs in `slice::from_raw_parts_mut`Tobias Bucher-4/+7
2018-09-03Add const_unstable flag to `overflowing_shr`Tim Diekmann-0/+1
2018-09-02Auto merge of #53599 - matthiaskrgr:split_str__to__split_char, r=frewsxcvbors-1/+1
use char pattern for single-character splits: a.split("x") -> a.split('x')
2018-09-01remark on concurrency in validity sectionRalf Jung-0/+9
2018-09-01Valid raw pointersRalf Jung-1/+1
2018-09-01Auto merge of #53884 - kennytm:rollup, r=kennytmbors-2/+2
Rollup of 9 pull requests Successful merges: - #53076 (set cfg(rustdoc) when rustdoc is running on a crate) - #53622 (cleanup: Add main functions to some UI tests) - #53769 (Also link Clippy repo in the CONTRIBUTING.md file) - #53774 (Add rust-gdbgui script.) - #53781 (bench: libcore: fix build failure of any.rs benchmark (use "dyn Any")) - #53782 (Make Arc cloning mechanics clearer in module docs) - #53790 (Add regression test for issue #52060) - #53801 (Prevent duplicated impl on foreign types) - #53850 (Nuke the `const_to_allocation` query)
2018-09-01Rollup merge of #53076 - QuietMisdreavus:cfg-rustdoc, r=GuillaumeGomezkennytm-1/+1
set cfg(rustdoc) when rustdoc is running on a crate When using `#[doc(cfg)]` to document platform-specific items, it's a little cumbersome to get all the platforms' items to appear all at once. For example, the standard library adds `--cfg dox` to rustdoc's command line whenever it builds docs, and the documentation for `#![feature(doc_cfg)]` suggests using a Cargo feature to approximate the same thing. This is a little awkward, because you always need to remember to set `--features dox` whenever you build documentation. This PR proposes making rustdoc set `#[cfg(rustdoc)]` whenever it runs on a crate, to provide an officially-sanctioned version of this that is set automatically. This way, there's a standardized way to declare that a certain version of an item is specifically when building docs. To try to prevent the spread of this feature from happening too quickly, this PR also restricts the use of this flag to whenever `#![feature(doc_cfg)]` is active. I'm sure there are other uses for this, but right now i'm tying it to this feature. (If it makes more sense to give this its own feature, i can easily do that.)