about summary refs log tree commit diff
path: root/src/libcollections
AgeCommit message (Collapse)AuthorLines
2015-03-30Document std::borrow with examplesSteve Klabnik-0/+56
2015-03-30Document the effect of `#` on array formattingMatt Brubeck-6/+6
2015-03-31replace deprecated as_slice()Emeliov Dmitrii-9/+8
2015-03-30std: Standardize (input, output) param orderingsAlex Crichton-46/+48
This functions swaps the order of arguments to a few functions that previously took (output, input) parameters, but now take (input, output) parameters (in that order). The affected functions are: * ptr::copy * ptr::copy_nonoverlapping * slice::bytes::copy_memory * intrinsics::copy * intrinsics::copy_nonoverlapping Closes #22890 [breaking-change]
2015-03-30convert: add Into<Cow> impls for &str and StringSean McArthur-2/+19
2015-03-30Change max size to isizebcoopers-8/+14
2015-03-30Remove unnecessary `as usize`Vadim Petrochenkov-18/+18
2015-03-29If doubling the vector in reserve() brings you over usize::MAX,bcoopers-1/+1
try to get capacity for usize::MAX
2015-03-29change std::usize to usizebcoopers-2/+2
2015-03-29Vector can currently panic when pushing an element or reserving spacebcoopers-5/+11
for only half of the maximum size available on the architecture. This allows vectors to keep expanding with those two methods until the amount of bytes exceeds usize.
2015-03-29Rollup merge of #23821 - nicholasbishop:bishop-slice-iter-typo-fix, ↵Manish Goregaokar-2/+2
r=alexcrichton
2015-03-29Auto merge of #23810 - sfackler:debug-collections, r=alexcrichtonbors-24/+4
The collections debug helpers no longer prefix output with the collection name, in line with the current conventions for Debug implementations. Implementations that want to preserve the current behavior can simply add a `try!(write!(fmt, "TypeName "));` at the beginning of the `fmt` method. [breaking-change]
2015-03-28Fix typo in docstring for sliceNicholas Bishop-2/+2
2015-03-28Remove IteratorExtSteven Fackler-6/+5
All methods are inlined into Iterator with `Self: Sized` bounds to make sure Iterator is still object safe. [breaking-change]
2015-03-28Fold collections debug implsSteven Fackler-15/+3
Also convert [T]'s Debug impl. The behavior of the alternate flag here's changing.
2015-03-28Update debug helpers and add list builderSteven Fackler-21/+13
The collections debug helpers no longer prefix output with the collection name, in line with the current conventions for Debug implementations. Implementations that want to preserve the current behavior can simply add a `try!(write!(fmt, "TypeName "));` at the beginning of the `fmt` method. [breaking-change]
2015-03-28Rollup merge of #23803 - richo:unused-braces, r=ManishearthManish Goregaokar-2/+2
Pretty much what it says on the tin.
2015-03-28cleanup: Remove unused braces in use statementsRicho Healey-2/+2
2015-03-27rollup merge of #23794: brson/slicegateAlex Crichton-0/+1
Conflicts: src/test/run-pass/issue-13027.rs
2015-03-27Feature gate *all* slice patterns. #23121Brian Anderson-0/+1
Until some backwards-compatibility hazards are fixed in #23121, these need to be unstable. [breaking-change]
2015-03-27rollup merge of #23738: alexcrichton/snapshotsAlex Crichton-226/+0
Conflicts: src/libcollections/vec.rs
2015-03-27rollup merge of #23776: nrc/allow_trivial_castAlex Crichton-1/+0
r? @alexcrichton
2015-03-27rollup merge of #23740: alexcrichton/remove-deprecated-slicing-syntaxAlex Crichton-1/+1
This syntax has been deprecated for quite some time, and there were only a few remaining uses of it in the codebase anyway.
2015-03-27rollup merge of #23721: erickt/deprecateAlex Crichton-34/+23
This is technically a breaking change as it deprecates and unstables some previously stable apis that were missed in the last round of deprecations. [breaking change]
2015-03-27rollup merge of #23535: pnkfelix/fsk-filling-dropAlex Crichton-5/+7
Replace zeroing-on-drop with filling-on-drop. This is meant to set the stage for removing *all* zeroing and filling (on drop) in the future. Note that the code is meant to be entirely abstract with respect to the particular values used for the drop flags: the final commit demonstrates how to go from zeroing-on-drop to filling-on-drop by changing the value of three constants (in two files). See further discussion on the internals thread: http://internals.rust-lang.org/t/attention-hackers-filling-drop/1715/11 [breaking-change] especially for structs / enums using `#[unsafe_no_drop_flag]`.
2015-03-27default => or_insert per RFCAlexis Beingessner-8/+8
2015-03-27Change the trivial cast lints to allow by defaultNick Cameron-1/+0
2015-03-26update everything to use Entry defaultsAlexis-22/+4
2015-03-26entry API v3: replace Entry::get with Entry::default and Entry::default_withAlexis-1/+49
2015-03-26syntax: Remove parsing of old slice syntaxAlex Crichton-1/+1
This syntax has been deprecated for quite some time, and there were only a few remaining uses of it in the codebase anyway.
2015-03-26Register new snapshotsAlex Crichton-226/+0
2015-03-26Deprecate as_mut_slice methodsErick Tryzelaar-34/+23
This is technically a breaking change as it deprecates and unstables some previously stable apis that were missed in the last round of deprecations. [breaking change]
2015-03-26Added instability markers to `POST_DROP_*` consts, and related opt-in's.Felix S. Klock II-1/+1
(Reviewed rest of code; did not see other `pub` items that needed such treatment.) Driveby: fix typo in comment in ptr.rs.
2015-03-26Switch drop-flag to `u8` to allow special tags to instrument state.Felix S. Klock II-4/+6
Refactored code so that the drop-flag values for initialized (`DTOR_NEEDED`) versus dropped (`DTOR_DONE`) are given explicit names. Add `mem::dropped()` (which with `DTOR_DONE == 0` is semantically the same as `mem::zeroed`, but the point is that it abstracts away from the particular choice of value for `DTOR_DONE`). Filling-drop needs to use something other than `ptr::read_and_zero`, so I added such a function: `ptr::read_and_drop`. But, libraries should not use it if they can otherwise avoid it. Fixes to tests to accommodate filling-drop.
2015-03-25Rollup merge of #23664 - bluss:std-docs, r=steveklabnikManish Goregaokar-42/+34
Main motivation was to update docs for the removal or "demotion" of certain extension traits. The update to the slice docs was larger, since the text was largely outdated.
2015-03-25Rollup merge of #23617 - steveklabnik:gh23564, r=ManishearthManish Goregaokar-0/+2
Fixes #23564
2015-03-25Auto merge of #23670 - cmr:vec-push-slowpath, r=pcwaltonbors-9/+16
Makes Vec::push considerably smaller: 25 instructions, rather than 42, on x86_64.
2015-03-24collections: Update docs for slice since SliceExt was removedUlrik Sverdrup-41/+33
A lot has changed since this doc text was last touched up, and this is just a minor edit. I remove the trait section entirely since we don't use extension traits that much anymore, so there are no significant trait hilights for this module.
2015-03-24core: Update docs for StrExt demotion in libstdUlrik Sverdrup-1/+1
Main access point of .split() and other similar methods are not using the StrExt trait anymore, so update the libcore docs to reflect this (because these docs are visible in libstd API documentation).
2015-03-24libcollections: move Vec::push slow path outCorey Richardson-9/+16
Makes Vec::push considerably smaller: 25 instructions, rather than 42, on x86_64.
2015-03-25Change lint names to pluralsNick Cameron-2/+2
2015-03-25Add trivial cast lints.Nick Cameron-2/+4
This permits all coercions to be performed in casts, but adds lints to warn in those cases. Part of this patch moves cast checking to a later stage of type checking. We acquire obligations to check casts as part of type checking where we previously checked them. Once we have type checked a function or module, then we check any cast obligations which have been acquired. That means we have more type information available to check casts (this was crucial to making coercions work properly in place of some casts), but it means that casts cannot feed input into type inference. [breaking change] * Adds two new lints for trivial casts and trivial numeric casts, these are warn by default, but can cause errors if you build with warnings as errors. Previously, trivial numeric casts and casts to trait objects were allowed. * The unused casts lint has gone. * Interactions between casting and type inference have changed in subtle ways. Two ways this might manifest are: - You may need to 'direct' casts more with extra type information, for example, in some cases where `foo as _ as T` succeeded, you may now need to specify the type for `_` - Casts do not influence inference of integer types. E.g., the following used to type check: ``` let x = 42; let y = &x as *const u32; ``` Because the cast would inform inference that `x` must have type `u32`. This no longer applies and the compiler will fallback to `i32` for `x` and thus there will be a type error in the cast. The solution is to add more type information: ``` let x: u32 = 42; let y = &x as *const u32; ```
2015-03-23Test fixes and rebase conflicts, round 2Alex Crichton-12/+20
2015-03-23rollup merge of #23598: brson/gateAlex Crichton-1/+164
Conflicts: src/compiletest/compiletest.rs src/libcollections/lib.rs src/librustc_back/lib.rs src/libserialize/lib.rs src/libstd/lib.rs src/libtest/lib.rs src/test/run-make/rustdoc-default-impl/foo.rs src/test/run-pass/env-home-dir.rs
2015-03-23rollup merge of #23648: steveklabnik/rollupAlex Crichton-15/+17
- Successful merges: #22954, #23119, #23509, #23561, #23590, #23607, #23608, #23618, #23622, #23639, #23641 - Failed merges: #23401
2015-03-23rollup merge of #23637: apasel422/iterAlex Crichton-1/+8
2015-03-23rollup merge of #23604: apasel422/btreeAlex Crichton-0/+41
`btree_map::IntoIter` (and `btree_set::IntoIter`) remains, but it is a bit trickier.
2015-03-23rollup merge of #23601: nikomatsakis/by-value-indexAlex Crichton-3/+259
This is a [breaking-change]. When indexing a generic map (hashmap, etc) using the `[]` operator, it is now necessary to borrow explicitly, so change `map[key]` to `map[&key]` (consistent with the `get` routine). However, indexing of string-valued maps with constant strings can now be written `map["abc"]`. r? @japaric cc @aturon @Gankro
2015-03-23rollup merge of #23580: nikomatsakis/pattern-and-overflowAlex Crichton-0/+20
2015-03-23rollup merge of #23538: aturon/conversionAlex Crichton-30/+96
Conflicts: src/librustc_back/rpath.rs