about summary refs log tree commit diff
path: root/src/libcore
AgeCommit message (Collapse)AuthorLines
2014-10-31auto merge of #18431 : japaric/rust/show, r=alexcrichtonbors-28/+28
r? @aturon cc #16918
2014-10-30DSTify Show and all the other formatting traitsJorge Aparicio-28/+28
2014-10-30Test fixes and rebase conflictsAlex Crichton-3/+3
2014-10-30rollup merge of #18445 : alexcrichton/index-mutAlex Crichton-97/+0
Conflicts: src/libcollections/vec.rs
2014-10-30rollup merge of #18398 : aturon/lint-conventions-2Alex Crichton-17/+17
Conflicts: src/libcollections/slice.rs src/libcore/failure.rs src/libsyntax/parse/token.rs src/test/debuginfo/basic-types-mut-globals.rs src/test/debuginfo/simple-struct.rs src/test/debuginfo/trait-pointers.rs
2014-10-30Add a `repeat` function to the preludeJakub Bukaj-2/+7
Implements a part of RFC 235. [breaking-change]
2014-10-30Doc: Clears up trim_char docgamazeps-1/+1
Closes #18451
2014-10-30rollup merge of #18421 : tbu-/pr_checkeddiv1Alex Crichton-1/+1
2014-10-30rollup merge of #18392 : cakebaker/remove_double_negationAlex Crichton-1/+1
2014-10-30collections: Enable IndexMut for some collectionsAlex Crichton-97/+0
This commit enables implementations of IndexMut for a number of collections, including Vec, RingBuf, SmallIntMap, TrieMap, TreeMap, and HashMap. At the same time this deprecates the `get_mut` methods on vectors in favor of using the indexing notation. cc #18424
2014-10-30auto merge of #18367 : pcwalton/rust/inline-atomic-constructors, r=thestingerbors-0/+4
Servo really wants this. r? @brson
2014-10-29Update infrastructure for fail -> panicSteve Klabnik-0/+47
This includes updating the language items and marking what needs to change after a snapshot. If you do not use the standard library, the language items you need to implement have changed. For example: ```rust #[lang = "fail_fmt"] fn fail_fmt() -> ! { loop {} } ``` is now ```rust #[lang = "panic_fmt"] fn panic_fmt() -> ! { loop {} } ``` Related, lesser-implemented language items `fail` and `fail_bounds_check` have become `panic` and `panic_bounds_check`, as well. These are implemented by `libcore`, so it is unlikely (though possible!) that these two renamings will affect you. [breaking-change] Fix test suite
2014-10-29Rename fail! to panic!Steve Klabnik-88/+88
https://github.com/rust-lang/rfcs/pull/221 The current terminology of "task failure" often causes problems when writing or speaking about code. You often want to talk about the possibility of an operation that returns a Result "failing", but cannot because of the ambiguity with task failure. Instead, you have to speak of "the failing case" or "when the operation does not succeed" or other circumlocutions. Likewise, we use a "Failure" header in rustdoc to describe when operations may fail the task, but it would often be helpful to separate out a section describing the "Err-producing" case. We have been steadily moving away from task failure and toward Result as an error-handling mechanism, so we should optimize our terminology accordingly: Result-producing functions should be easy to describe. To update your code, rename any call to `fail!` to `panic!` instead. Assuming you have not created your own macro named `panic!`, this will work on UNIX based systems: grep -lZR 'fail!' . | xargs -0 -l sed -i -e 's/fail!/panic!/g' You can of course also do this by hand. [breaking-change]
2014-10-29Fix `core::num::CheckedDiv::checked_div` documentationTobias Bucher-1/+1
The "/" was probably generated by a `gq` in vim.
2014-10-28auto merge of #17603 : jakub-/rust/ty_bot, r=nikomatsakisbors-1/+1
We now instead use a fresh variable for expressions that diverge. Closes #14973. Closes #13847. [Work in progress] cc @nikomatsakis
2014-10-28Remove ty_bot from the type systemJakub Bukaj-1/+1
We now instead use a fresh variable for expressions that diverge.
2014-10-28Update code with new lint namesAaron Turon-19/+19
2014-10-28Remove double negation from sqrt's doc commentDaniel Hofstetter-1/+1
2014-10-27DSTify [T]/str extension traitsJorge Aparicio-178/+179
This PR changes the signature of several methods from `foo(self, ...)` to `foo(&self, ...)`/`foo(&mut self, ...)`, but there is no breakage of the usage of these methods due to the autoref nature of `method.call()`s. This PR also removes the lifetime parameter from some traits (`Trait<'a>` -> `Trait`). These changes break any use of the extension traits for generic programming, but those traits are not meant to be used for generic programming in the first place. In the whole rust distribution there was only one misuse of a extension trait as a bound, which got corrected (the bound was unnecessary and got removed) as part of this PR. [breaking-change]
2014-10-27rollup merge of #18316 : thestinger/rawAlex Crichton-1/+4
2014-10-27libcore: Inline atomic constructors.Patrick Walton-0/+4
Servo really wants this.
2014-10-26auto merge of #18212 : kmcallister/rust/unsafecell, r=thestingerbors-0/+22
Fixes #18131.
2014-10-25make the core::raw struct representation definedDaniel Micay-1/+4
Closes #18313
2014-10-25auto merge of #18080 : veddan/rust/assume, r=thestingerbors-0/+11
Adds an `assume` intrinsic that gets translated to llvm.assume. It is used on a boolean expression and allows the optimizer to assume that the expression is true. This implements #18051.
2014-10-24Add as_unsafe_cell() for Cell and RefCellKeegan McAllister-0/+22
Fixes #18131.
2014-10-24auto merge of #17960 : mahkoh/rust/clone_from_slice, r=pcwaltonbors-4/+7
Old vs. New vs. Vec::push_all ``` test slice ... bench: 3091942 ns/iter (+/- 54460) test slice_new ... bench: 1800065 ns/iter (+/- 69513) test vec ... bench: 1804805 ns/iter (+/- 75609) ```
2014-10-22auto merge of #18121 : ↵bors-3/+3
nikomatsakis/rust/method-call-use-trait-matching-infrastructure-2, r=pcwalton Convert trait method dispatch to use new trait matching machinery. This fixes about 90% of #17918. What remains to be done is to make inherent dispatch work with conditional dispatch as well. I plan to do this in a future patch by generalizing the "method match" code slightly to work for inherent impls as well (the basic algorithm is precisely the same). Fixes #17178. This is a [breaking-change] for two reasons: 1. The old code was a bit broken. I found various minor cases, particularly around operators, where the old code incorrectly matched, but an extra `*` or other change is now required. (See commit e8cef25 ("Correct case where the old version of method lookup...") for examples.) 2. The old code didn't type check calls against the method signature from the *trait* but rather the *impl*. The two can be different in subtle ways. This makes the new method dispatch both more liberal and more conservative than the original. (See commit 8308332 ("The new method lookup mechanism typechecks...") for examples.) r? @pcwalton since he's been reviewing most of this series of changes f? @nick29581 for commit 39df55f ("Permit DST types to unify like other types") cc @aturon as this relates to library stabilization
2014-10-21Patch up broken error messagesNiko Matsakis-1/+1
2014-10-21Correct case where the old version of method lookup was incorrectly matching,Niko Matsakis-2/+2
as far as I can tell.
2014-10-21auto merge of #18201 : Gankro/rust/option-what, r=alexcrichtonbors-1/+1
:whale:
2014-10-20Fix crazy-pants match in Option docsAlexis Beingessner-1/+1
2014-10-20auto merge of #18070 : alexcrichton/rust/spring-cleaning, r=aturonbors-731/+8
This is a large spring-cleaning commit now that the 0.12.0 release has passed removing an amount of deprecated functionality. This removes a number of deprecated crates (all still available as cargo packages in the rust-lang organization) as well as a slew of deprecated functions. All `#[crate_id]` support has also been removed. I tried to avoid anything that was recently deprecated, but I may have missed something! The major pain points of this commit is the fact that rustc/syntax have `#[allow(deprecated)]`, but I've removed that annotation so moving forward they should be cleaned up as we go.
2014-10-20auto merge of #18174 : huonw/rust/fix-sqrt, r=alexcrichtonbors-3/+12
Closes #9987.
2014-10-20Handle negative numbers in `sqrt` properly.Huon Wilson-3/+12
Closes #9987.
2014-10-19Remove a large amount of deprecated functionalityAlex Crichton-731/+8
Spring cleaning is here! In the Fall! This commit removes quite a large amount of deprecated functionality from the standard libraries. I tried to ensure that only old deprecated functionality was removed. This is removing lots and lots of deprecated features, so this is a breaking change. Please consult the deprecation messages of the deleted code to see how to migrate code forward if it still needs migration. [breaking-change]
2014-10-18Mark lt as inline in PartialOrdRay Clanan-0/+1
2014-10-18auto merge of #18024 : phungleson/rust/fix-var-name-in-doc, r=brsonbors-11/+10
Make the doc more consistent & runnable. * Use `_index` instead of `_rhs` when appropriate. * Use `_from` and `_to` to avoid warning. * Remove unnecessary `::core::ops`
2014-10-16librustc: Remove trans::reflect and the opaque and ty_visitor lang items.Luqman Aden-0/+3
2014-10-16librustc: Stop generating visit glue and remove from TyDesc.Luqman Aden-0/+1
2014-10-16librustc: Remove visit_tydesc intrinsic.Luqman Aden-2/+0
2014-10-16Improve documentation of assume intrinsic.Viktor Dahl-1/+5
2014-10-16Add assume intrinsicViktor Dahl-0/+7
Adds an `assume` intrinsic that gets translated to llvm.assume. It is used on a boolean expression and allows the optimizer to assume that the expression is true. This implements #18051.
2014-10-14auto merge of #18029 : Ms2ger/rust/patch-1, r=huonwbors-1/+1
2014-10-14Fix the formatting of the documentation for OrdIterator.min_max.Ms2ger-1/+1
2014-10-14Change `from` and `to` to `_from` and `_to`Son-6/+6
This to avoid warning: unused variable: `from`, #[warn(unused_variable)] on by default.
2014-10-14Remove unnecessary ::core::ops::Son-2/+2
It shows error: failed to resolve. Maybe a missing `extern crate core` anyway.
2014-10-14Change _rhs to _index.Son-3/+2
Because var is provided as an index not a right hand side.
2014-10-13Fix typo in char's from_digit error messageStefan Bucur-1/+1
2014-10-12improve clone_from_slice performanceJulian Orth-4/+7
2014-10-10Register new snapshotsAlex Crichton-115/+1
Also convert a number of `static mut` to just a plain old `static` and remove some unsafe blocks.