summary refs log tree commit diff
path: root/src/libcore
AgeCommit message (Collapse)AuthorLines
2015-12-09doc: these are just renames, so avoid duplicationTshepang Lekhonkhobe-30/+2
2015-12-07Revert "PR #30130 Implement `Clone` for more arrays"Ulrik Sverdrup-28/+8
This reverts commit e22a64e8d8d4da46c74f878ce1c23ad1c88982e8. This caused a regression such that types like `[[u8; 256]; 4]` no longer implemented Clone. This previously worked due to Clone for `[T; N]` (N in 0 to 32) being implemented for T: Copy. Due to fixed size arrays not implementing Clone for sizes above 32, the new implementation requiring T: Clone would not allow `[[u8; 256]; 4]` to be Clone.
2015-12-06Auto merge of #30187 - alexcrichton:stabilize-1.6, r=aturonbors-252/+295
This commit is the standard API stabilization commit for the 1.6 release cycle. The list of issues and APIs below have all been through their cycle-long FCP and the libs team decisions are listed below Stabilized APIs * `Read::read_exact` * `ErrorKind::UnexpectedEof` (renamed from `UnexpectedEOF`) * libcore -- this was a bit of a nuanced stabilization, the crate itself is now marked as `#[stable]` and the methods appearing via traits for primitives like `char` and `str` are now also marked as stable. Note that the extension traits themeselves are marked as unstable as they're imported via the prelude. The `try!` macro was also moved from the standard library into libcore to have the same interface. Otherwise the functions all have copied stability from the standard library now. * `fs::DirBuilder` * `fs::DirBuilder::new` * `fs::DirBuilder::recursive` * `fs::DirBuilder::create` * `os::unix::fs::DirBuilderExt` * `os::unix::fs::DirBuilderExt::mode` * `vec::Drain` * `vec::Vec::drain` * `string::Drain` * `string::String::drain` * `vec_deque::Drain` * `vec_deque::VecDeque::drain` * `collections::hash_map::Drain` * `collections::hash_map::HashMap::drain` * `collections::hash_set::Drain` * `collections::hash_set::HashSet::drain` * `collections::binary_heap::Drain` * `collections::binary_heap::BinaryHeap::drain` * `Vec::extend_from_slice` (renamed from `push_all`) * `Mutex::get_mut` * `Mutex::into_inner` * `RwLock::get_mut` * `RwLock::into_inner` * `Iterator::min_by_key` (renamed from `min_by`) * `Iterator::max_by_key` (renamed from `max_by`) Deprecated APIs * `ErrorKind::UnexpectedEOF` (renamed to `UnexpectedEof`) * `OsString::from_bytes` * `OsStr::to_cstring` * `OsStr::to_bytes` * `fs::walk_dir` and `fs::WalkDir` * `path::Components::peek` * `slice::bytes::MutableByteVector` * `slice::bytes::copy_memory` * `Vec::push_all` (renamed to `extend_from_slice`) * `Duration::span` * `IpAddr` * `SocketAddr::ip` * `Read::tee` * `io::Tee` * `Write::broadcast` * `io::Broadcast` * `Iterator::min_by` (renamed to `min_by_key`) * `Iterator::max_by` (renamed to `max_by_key`) * `net::lookup_addr` New APIs (still unstable) * `<[T]>::sort_by_key` (added to mirror `min_by_key`) Closes #27585 Closes #27704 Closes #27707 Closes #27710 Closes #27711 Closes #27727 Closes #27740 Closes #27744 Closes #27799 Closes #27801 cc #27801 (doesn't close as `Chars` is still unstable) Closes #28968
2015-12-05std: Stabilize APIs for the 1.6 releaseAlex Crichton-252/+295
This commit is the standard API stabilization commit for the 1.6 release cycle. The list of issues and APIs below have all been through their cycle-long FCP and the libs team decisions are listed below Stabilized APIs * `Read::read_exact` * `ErrorKind::UnexpectedEof` (renamed from `UnexpectedEOF`) * libcore -- this was a bit of a nuanced stabilization, the crate itself is now marked as `#[stable]` and the methods appearing via traits for primitives like `char` and `str` are now also marked as stable. Note that the extension traits themeselves are marked as unstable as they're imported via the prelude. The `try!` macro was also moved from the standard library into libcore to have the same interface. Otherwise the functions all have copied stability from the standard library now. * The `#![no_std]` attribute * `fs::DirBuilder` * `fs::DirBuilder::new` * `fs::DirBuilder::recursive` * `fs::DirBuilder::create` * `os::unix::fs::DirBuilderExt` * `os::unix::fs::DirBuilderExt::mode` * `vec::Drain` * `vec::Vec::drain` * `string::Drain` * `string::String::drain` * `vec_deque::Drain` * `vec_deque::VecDeque::drain` * `collections::hash_map::Drain` * `collections::hash_map::HashMap::drain` * `collections::hash_set::Drain` * `collections::hash_set::HashSet::drain` * `collections::binary_heap::Drain` * `collections::binary_heap::BinaryHeap::drain` * `Vec::extend_from_slice` (renamed from `push_all`) * `Mutex::get_mut` * `Mutex::into_inner` * `RwLock::get_mut` * `RwLock::into_inner` * `Iterator::min_by_key` (renamed from `min_by`) * `Iterator::max_by_key` (renamed from `max_by`) Deprecated APIs * `ErrorKind::UnexpectedEOF` (renamed to `UnexpectedEof`) * `OsString::from_bytes` * `OsStr::to_cstring` * `OsStr::to_bytes` * `fs::walk_dir` and `fs::WalkDir` * `path::Components::peek` * `slice::bytes::MutableByteVector` * `slice::bytes::copy_memory` * `Vec::push_all` (renamed to `extend_from_slice`) * `Duration::span` * `IpAddr` * `SocketAddr::ip` * `Read::tee` * `io::Tee` * `Write::broadcast` * `io::Broadcast` * `Iterator::min_by` (renamed to `min_by_key`) * `Iterator::max_by` (renamed to `max_by_key`) * `net::lookup_addr` New APIs (still unstable) * `<[T]>::sort_by_key` (added to mirror `min_by_key`) Closes #27585 Closes #27704 Closes #27707 Closes #27710 Closes #27711 Closes #27727 Closes #27740 Closes #27744 Closes #27799 Closes #27801 cc #27801 (doesn't close as `Chars` is still unstable) Closes #28968
2015-12-04Don't use an explicit temporary for cloning an arrayTobias Bucher-2/+1
2015-12-04Implement `Clone` for arrays without using slice patternsTobias Bucher-10/+9
2015-12-04Implement `Clone` for `[T; 0]` to `[T; 32]` if `T: Clone`Tobias Bucher-8/+30
2015-11-29libcore/iter: fix typosIvan Stankovic-4/+4
2015-11-26Auto merge of #30068 - wthrowe:unsized-pointer-impls, r=alexcrichtonbors-4/+4
I'm pretty sure this code isn't actually used by the compiler, so this is effectively a documentation change.
2015-11-26Mark raw pointer Send and Sync impls ?SizedWilliam Throwe-4/+4
I'm pretty sure this code isn't actually used by the compiler, so this is effectively a documentation change.
2015-11-25Remove all uses of `#[staged_api]`Vadim Petrochenkov-1/+1
2015-11-25Improve docs for std::charSteve Klabnik-16/+142
Part of #29428
2015-11-23Auto merge of #29952 - petrochenkov:depr, r=brsonbors-16/+17
Part of https://github.com/rust-lang/rust/issues/29935 The deprecation lint is still called "deprecated", so people can continue using `#[allow(deprecated)]` and similar things.
2015-11-23Improve slice indexing assertionManish Goregaokar-4/+22
2015-11-23Mark slice_error_fail as a cold pathManish Goregaokar-0/+1
2015-11-20Rename #[deprecated] to #[rustc_deprecated]Vadim Petrochenkov-16/+17
2015-11-20Add information about str::parse() in FromStr docsDevon Hollowood-0/+7
2015-11-18Auto merge of #29083 - petrochenkov:stability3, r=alexcrichtonbors-3/+116
What this patch does: - Stability annotations are now based on "exported items" supplied by rustc_privacy and not "public items". Exported items are as accessible for external crates as directly public items and should be annotated with stability attributes. - Trait impls require annotations now. - Reexports require annotations now. - Crates themselves didn't require annotations, now they do. - Exported macros are annotated now, but these annotations are not used yet. - Some useless annotations are detected and result in errors - Finally, some small bugs are fixed - deprecation propagates from stable deprecated parents, items in blocks are traversed correctly (fixes https://github.com/rust-lang/rust/issues/29034) + some code cleanup.
2015-11-18Fix typo in libcore documentationAndrea Canciani-1/+1
2015-11-18Auto merge of #29882 - devonhollowood:master, r=Manishearthbors-1/+0
Implement #14615
2015-11-17Rollup merge of #29892 - steveklabnik:doc_fromiterator, r=alexcrichtonSteve Klabnik-16/+132
And modifying IntoIterator for consisntency with it. Part of #29360
2015-11-17Rollup merge of #29612 - steveklabnik:gh29502, r=alexcrichtonSteve Klabnik-1/+4
libcore does have a few deps, like noted in https://github.com/rust-lang/rust/issues/29390 Fixes #29502 r? @alexcrichton
2015-11-17More docs for FromIteratorSteve Klabnik-16/+132
And modifying IntoIterator for consisntency with it. Part of #29360
2015-11-17Remove claims of dependency-free libcoreSteve Klabnik-1/+4
libcore does have a few deps, like noted in https://github.com/rust-lang/rust/issues/29390 Fixes #29502
2015-11-18Review fixesVadim Petrochenkov-4/+4
2015-11-18Add missing annotations and some testsVadim Petrochenkov-3/+116
2015-11-17Rollup merge of #29874 - steveklabnik:gh29711, r=alexcrichtonManish Goregaokar-0/+18
in their API docs Fixes #29711
2015-11-17Remove 'raw_pointer_derive' lint (#14615)Devon Hollowood-1/+0
2015-11-16Make note about traits that can be derivedSteve Klabnik-0/+18
in their API docs Fixes #29711
2015-11-16Make `min_value()` and `max_value()` const functionsAndrea Canciani-5/+5
2015-11-13Auto merge of #29808 - aphistic:trait-debug-example-fix, r=steveklabnikbors-1/+1
The example given for the manual implementation of the core::fmt::Debug trait doesn't match the output after the code sample. This updates it so it matches.
2015-11-12Fix the manual implementation example for the Debug trait so it matches the ↵Erik Davidson-1/+1
given output
2015-11-12Auto merge of #29712 - Toby-S:patch-1, r=steveklabnikbors-31/+342
Adds `Example` sections to the rest of the integer methods. cc @steveklabnik
2015-11-12Auto merge of #29544 - Ryman:reduce_doc_warnings, r=steveklabnikbors-10/+48
Did this alphabetically, so I didn't see [how `std` was doing things](https://dxr.mozilla.org/rust/source/src/libstd/lib.rs#215) till I was nearly finished. If you prefer to add crate-level-whitelists like std instead of test-level, I can rebase with that strategy. A number of these commits can probably be dropped as the crates don't have much to test, and are deprecated. Let me know which if any to drop! (can also squash after review if desired) r? @steveklabnik
2015-11-12Auto merge of #29770 - ollie27:assert_eq_unsized, r=alexcrichtonbors-1/+1
`format_args!` doesn't support none Sized types so we should just pass it the references to `left_val` and `right_val`. The following works: ```rust assert!([1, 2, 3][..] == vec![1, 2, 3][..]) ``` So I would expect this to as well: ```rust assert_eq!([1, 2, 3][..], vec![1, 2, 3][..]) ``` But it fails with "error: the trait `core::marker::Sized` is not implemented for the type `[_]` [E0277]" I don't know if this change will have any nasty side effects I don't understand.
2015-11-12libcore: deny warnings in doctestsKevin Butler-10/+48
2015-11-12Fix article in Result.map and Result.map_err documentationDanilo Bargen-2/+2
2015-11-12docs: Fix variable nameKohei Hasegawa-6/+6
2015-11-11Allow none Sized types in assert_eq!Oliver Middleton-1/+1
format_args! doesn't support none Sized types so we should just pass it the references to left_val and right_val. This fixes `assert_eq!([1, 2, 3][..], vec![1, 2, 3][..])` for example.
2015-11-10Add examples to methods on integer typesToby Scrace-31/+342
2015-11-10Some cleanup on after #29684Steve Klabnik-14/+13
* wrap to 80 cols * small grammar fix, missing 'the'
2015-11-08Explain that size_hint cannot be trustedStepan Koltsov-0/+23
Same applies to `len()` function of `ExactSizeIterator` trait.
2015-11-07Remove duplicate words from docsAndrew Paseltiner-2/+2
2015-11-06Auto merge of #29643 - petrochenkov:stability5, r=alexcrichtonbors-21/+0
Also remove `stable` stability annotations from inherent impls (There will be a warning for useless stability annotations soon.) r? @Gankro
2015-11-06Remove stability annotations from trait impl itemsVadim Petrochenkov-21/+0
Remove `stable` stability annotations from inherent impls
2015-11-05Tidy `core::marker` doc summariesAndrew Paseltiner-2/+2
2015-11-05Auto merge of #29593 - ben0x539:reflect-doc-comment, r=steveklabnikbors-5/+6
Rustdoc takes the first paragraph as a summary, so having a huge paragraph that ends with introducing an example looked somewhat wrong on the module page.
2015-11-05docs for Reflect: blank line after first sentenceBenjamin Herr-5/+6
Rustdoc takes the first paragraph as a summary, so having a huge paragraph that ends with introducing an example looked somewhat wrong on the module page.
2015-11-05Rollup merge of #29539 - shepmaster:empty-iterator-docs, r=GankroSteve Klabnik-0/+8
2015-11-03Mention what iterator terminators do with an empty iteratorJake Goulding-0/+8