about summary refs log tree commit diff
path: root/src/libcore
AgeCommit message (Collapse)AuthorLines
2014-09-25Fallout from deprecationAaron Turon-0/+1
2014-09-25Stabilize mutable slice APIAaron Turon-239/+266
This commit is another in the series of vector slice API stabilization. The focus here is the *mutable* slice API. Largely, this API inherits the stability attributes [previously assigned](https://github.com/rust-lang/rust/pull/16332) to the analogous methods on immutable slides. It also adds comments to a few `unstable` attributes that were previously missing them. In addition, the commit adds several `_mut` variants of APIs that were missing: - `init_mut` - `head_mut` - `tail_mut` - `splitn_mut` - `rsplitn_mut` Some of the unsafe APIs -- `unsafe_set`, `init_elem`, and `copy_memory` -- were deprecated in favor of working through `as_mut_ptr`, to simplify the API surface. Due to deprecations, this is a: [breaking-change]
2014-09-25auto merge of #17466 : nikomatsakis/rust/oibt, r=pcwaltonbors-4/+4
Moves the vast majority of builtin bound checking out of type contents and into the trait system. This is a preliminary step for a lot of follow-on work: - opt-in builtin types, obviously - generalized where clauses, because TypeContents has this notion that a type parameter has a single set of builtin kinds, but with where clauses it depends on context - generalized coherence, because this adds support for recursive trait selection Unfortunately I wasn't able to completely remove Type Contents from the front-end checking in this PR. It's still used by EUV to decide what gets moved and what doesn't. r? @pcwalton
2014-09-25auto merge of #17482 : hoeppnertill/rust/master, r=alexcrichtonbors-1/+27
Intended to prevent each user to write his own partial_min/max, possibly differing in slight details. @sfackler encouraged to PR this on IRC. (Let's hope this works... First PR.)
2014-09-25auto merge of #17455 : steveklabnik/rust/document_default, r=alexcrichtonbors-3/+108
Given that the `Default` module is now stable, it might as well get good docs.
2014-09-25auto merge of #17498 : coyotebush/rust/iter-doc, r=huonwbors-3/+1
OrdIterator: the doc says that values must implement `PartialOrd`, while the implementation is only for `Ord` values. It looks like this initially got out of sync in 4e1c215. Removed the doc sentence entirely since it seems redundant. MultiplicativeIterator: Fixed weird sentence.
2014-09-25Add partial_min/max to libcore/cmpTill Hoeppner-1/+27
Add partial_min/max to libcore/cmp Match against None and mark as experimental Shortened documentation. Removed whitespace
2014-09-25Integrate builtin bounds fully into the trait checkerNiko Matsakis-4/+4
2014-09-25auto merge of #17428 : fhahn/rust/issue-16114-rename-begin-unwind-2, ↵bors-11/+34
r=alexcrichton This is a PR for #16114 and includes to following things: * Rename `begin_unwind` lang item to `fail_fmt` * Rename `core::failure::begin_unwind` to `fail_impl` * Rename `fail_` lang item to `fail`
2014-09-24Beef up Default documentationSteve Klabnik-3/+108
2014-09-25Rename `begin_unwind_string` to `fail_str`, refs #16114Florian Hahn-8/+8
2014-09-25Rename `fail_` lang item to `fail`, closes #16114Florian Hahn-1/+16
2014-09-24Rename `core::failure::begin_unwind` to `fail_impl`, refs #16114Florian Hahn-11/+11
2014-09-24Rename `begin_unwind` lang item to `fail_fmt`, refs #16114Florian Hahn-0/+8
2014-09-24Remove unused enum variantsJakub Wieczorek-46/+9
2014-09-23Fix iterator docCorey Ford-3/+1
OrdIterator: the doc says that values must implement `PartialOrd`, while the implementation is only for `Ord` values. It looks like this initially got out of sync in 4e1c215. Removed the doc sentence entirely since it seems redundant. MultiplicativeIterator: Fixed weird sentence.
2014-09-23auto merge of #17446 : steveklabnik/rust/gh17445, r=alexcrichtonbors-3/+1
Fixes #17445.
2014-09-22librustc: Forbid private types in public APIs.Patrick Walton-2/+1
This breaks code like: struct Foo { ... } pub fn make_foo() -> Foo { ... } Change this code to: pub struct Foo { // note `pub` ... } pub fn make_foo() -> Foo { ... } The `visible_private_types` lint has been removed, since it is now an error to attempt to expose a private type in a public API. In its place a `#[feature(visible_private_types)]` gate has been added. Closes #16463. RFC #48. [breaking-change]
2014-09-22remove references to owned and managed pointers in clone docsSteve Klabnik-3/+1
Fixes #17445.
2014-09-22Fix deprecation warnings in check-docs.Victor Berger-2/+2
Fallout of closing #17185.
2014-09-22auto merge of #17339 : treeman/rust/doc-things, r=alexcrichtonbors-61/+477
Also some cleanup to conform to documentation style.
2014-09-19Implement slicing syntax.Nick Cameron-3/+160
`expr[]`, `expr[expr..]`, `expr[..expr]`,`expr[expr..expr]` Uses the Slice and SliceMut traits. Allows ... as well as .. in range patterns.
2014-09-17rollup merge of #17329 : alexcrichton/snapshotsAlex Crichton-7/+0
2014-09-17rollup merge of #16936 : nham/two_way_makeoverAlex Crichton-10/+90
2014-09-17doc: Backticks and spelling mistakes.Jonas Hietala-1/+1
2014-09-17doc: Methods for option::OptionJonas Hietala-1/+217
2014-09-17doc: Methods for result::Result.Jonas Hietala-28/+228
2014-09-17doc: Cleanup.Jonas Hietala-33/+33
Remove ~~~ for code block specification. Use /// Over /** */ for doc blocks.
2014-09-16Register new snapshotsAlex Crichton-7/+0
This is the first linux snapshot created on our new CentOS 5.10 builders. Closes #9545
2014-09-16Fallout from renamingAaron Turon-29/+29
2014-09-16Align with _mut conventionsAaron Turon-23/+104
As per [RFC 52](https://github.com/rust-lang/rfcs/blob/master/active/0052-ownership-variants.md), use `_mut` suffixes to mark mutable variants, and `into_iter` for moving iterators. [breaking-change]
2014-09-15auto merge of #16887 : steveklabnik/rust/guide_iterators, r=alexcrichtonbors-6/+0
This isn't ready to merge yet. The 'containers and iterators' guide is basically just a collection of stuff that should be in the module definitions. So I'm moving the guide to just an 'iterators' guide, and moved the info that was there into the right places. So, is this a good path forward, and is all of the information still correct?
2014-09-14auto merge of #17195 : tbu-/rust/pr_strfindoverflow2, r=alexcrichtonbors-0/+3
2014-09-13Remove container guide.Steve Klabnik-6/+0
This isn't really what guides are for, this information belongs in the module-level docs. Fixes #9314.
2014-09-12Document why `core::str::Searcher::new` doesn't overflowTobias Bucher-0/+3
2014-09-12auto merge of #17159 : brson/rust/snaps, r=alexcrichtonbors-61/+0
This switches win64 hosts to bootstrap from win64 snaps.
2014-09-11Fix bug in padding unicode, #17105.Ahmed Charles-2/+2
2014-09-10Register snapshotsBrian Anderson-61/+0
2014-09-09auto merge of #16662 : pczarn/rust/format-fmtstr-opt, r=brsonbors-1/+118
Based on an observation that strings and arguments are always interleaved, thanks to #15832. Additionally optimize invocations where formatting parameters are unspecified for all arguments, e.g. `"{} {:?} {:x}"`, by emptying the `__STATIC_FMTARGS` array. Next, `Arguments::new` replaces an empty slice with `None` so that passing empty `__STATIC_FMTARGS` generates slightly less machine code when `Arguments::new` is inlined. Furthermore, formatting itself treats these cases separately without making redundant copies of formatting parameters. All in all, this adds a single mov instruction per `write!` in most cases. That's why code size has increased.
2014-09-09Optimize for the most common cases of `format!`Piotr Czarnecki-6/+52
Format specs are ignored and not stored in case they're all default. Restore default formatting parameters during iteration. Pass `None` instead of empty slices of format specs to take advantage of non-nullable pointer optimization. Generate a call to one of two functions of `fmt::Argument`.
2014-09-09Decouple string and argument piecesPiotr Czarnecki-1/+72
2014-09-09rollup merge of #17080 : treeman/issue-17066Alex Crichton-1/+1
2014-09-09Check traits for built-in bounds in implsNick Cameron-2/+4
2014-09-07Flip arguments to `std::iter::iterate`.Jonas Hietala-1/+1
Breaks `iterate(f, seed)`, use `iterate(seed, f)` instead. The convention is to have the closure last. Closes #17066. [breaking-change]
2014-09-07auto merge of #17005 : bjz/rust/bit-count, r=thestingerbors-10/+10
Fixes rust-lang/rfcs#224
2014-09-07auto merge of #16999 : brson/rust/fannkuch, r=alexcrichtonbors-1/+6
From the discussion on reddit: http://www.reddit.com/r/rust/comments/2fenlg/benchmark_improvement_fannkuchredux/ This adds two variants: the primary, that uses an unsafe block, and a secondary that is completely safe. The one with the unsafe block matches clang's performance and beats gcc's.
2014-09-05Optimize Slice::reverseBrian Anderson-1/+6
This makes the completely safe implementation of fannkuchredux perform the same as C++. Yay, Rust.
2014-09-05Make integer bit count methods return uintsBrendan Zabarauskas-10/+10
Fixes rust-lang/rfcs#224
2014-09-05Update language item from 'share' to 'sync' #16988Felix Raimundo-1/+1
2014-09-04auto merge of #16982 : jbcrail/rust/comment-and-string-corrections, ↵bors-7/+7
r=alexcrichton I corrected spelling and capitalization errors in comments and strings.