Commit Graph

137 Commits

Author SHA1 Message Date
Richo Healey 553074506e core: rename strbuf::StrBuf to string::String
[breaking-change]
2014-05-24 21:48:10 -07:00
Brian Anderson 8e58ec5b9d std: Move unstable::finally to std::finally. #1457
[breaking-change]
2014-05-23 15:28:27 -07:00
Brian Anderson 1a1e6c8e73 std: Move simd to core::simd and reexport. #1457
[breaking-change]
2014-05-23 15:27:48 -07:00
bors 53db981148 auto merge of #14359 : brson/rust/minordoc, r=alexcrichton 2014-05-23 13:21:25 -07:00
Brian Anderson 807dffde18 Minor library doc copyediting 2014-05-23 10:33:21 -07:00
bors a0960a1223 auto merge of #14348 : alexcrichton/rust/doc.rust-lang.org, r=huonw 2014-05-22 16:56:23 -07:00
Patrick Walton 5633d4641f libstd: Remove all uses of `~str` from `libstd` 2014-05-22 14:42:02 -07:00
Patrick Walton 36195eb91f libstd: Remove `~str` from all `libstd` modules except `fmt` and `str`. 2014-05-22 14:42:01 -07:00
Alex Crichton 1ccc51ce3b doc: Fix some broken links 2014-05-21 20:33:00 -07:00
Alex Crichton 799ddba8da Change static.rust-lang.org to doc.rust-lang.org
The new documentation site has shorter urls, gzip'd content, and index.html
redirecting functionality.
2014-05-21 19:55:39 -07:00
Brian Anderson c9ab33a8fd Address review comments 2014-05-20 11:39:40 -07:00
Brian Anderson 1b8deb293e std: Alphabetize crate reexports for rustdoc 2014-05-20 10:38:22 -07:00
Brian Anderson 900b33a4e3 std: Fix broken link 2014-05-20 10:38:21 -07:00
Alex Crichton 639759b7f4 std: Refactor liballoc out of lib{std,sync}
This commit is part of the libstd facade RFC, issue #13851. This creates a new
library, liballoc, which is intended to be the core allocation library for all
of Rust. It is pinned on the basic assumption that an allocation failure is an
abort or failure.

This module has inherited the heap/libc_heap modules from std::rt, the owned/rc
modules from std, and the arc module from libsync. These three pointers are
currently the three most core pointer implementations in Rust.

The UnsafeArc type in std::sync should be considered deprecated and replaced by
Arc<Unsafe<T>>. This commit does not currently migrate to this type, but future
commits will continue this refactoring.
2014-05-17 21:52:23 -07:00
Alex Crichton c255568652 core: Implement unwrap()/unwrap_err() on Result
Now that std::fmt is in libcore, it's possible to implement this as an inherit
method rather than through extension traits.

This commit also tweaks the failure interface of libcore to libstd to what it
should be, one method taking &fmt::Arguments
2014-05-15 23:22:06 -07:00
Alex Crichton 8211539114 Register new snapshots 2014-05-15 13:50:34 -07:00
Alex Crichton cbc31df4fc std: Move the owned module from core to std
The compiler was updated to recognize that implementations for ty_uniq(..) are
allowed if the Box lang item is located in the current crate. This enforces the
idea that libcore cannot allocated, and moves all related trait implementations
from libcore to libstd.

This is a breaking change in that the AnyOwnExt trait has moved from the any
module to the owned module. Any previous users of std::any::AnyOwnExt should now
use std::owned::AnyOwnExt instead. This was done because the trait is intended
for Box traits and only Box traits.

[breaking-change]
2014-05-13 17:24:07 -07:00
Brian Anderson c1da4f875f Add the patch number to version strings. Closes #13289 2014-05-12 19:52:29 -07:00
Alex Crichton f94d671bfa core: Remove the cast module
This commit revisits the `cast` module in libcore and libstd, and scrutinizes
all functions inside of it. The result was to remove the `cast` module entirely,
folding all functionality into the `mem` module. Specifically, this is the fate
of each function in the `cast` module.

* transmute - This function was moved to `mem`, but it is now marked as
              #[unstable]. This is due to planned changes to the `transmute`
              function and how it can be invoked (see the #[unstable] comment).
              For more information, see RFC 5 and #12898

* transmute_copy - This function was moved to `mem`, with clarification that is
                   is not an error to invoke it with T/U that are different
                   sizes, but rather that it is strongly discouraged. This
                   function is now #[stable]

* forget - This function was moved to `mem` and marked #[stable]

* bump_box_refcount - This function was removed due to the deprecation of
                      managed boxes as well as its questionable utility.

* transmute_mut - This function was previously deprecated, and removed as part
                  of this commit.

* transmute_mut_unsafe - This function doesn't serve much of a purpose when it
                         can be achieved with an `as` in safe code, so it was
                         removed.

* transmute_lifetime - This function was removed because it is likely a strong
                       indication that code is incorrect in the first place.

* transmute_mut_lifetime - This function was removed for the same reasons as
                           `transmute_lifetime`

* copy_lifetime - This function was moved to `mem`, but it is marked
                  `#[unstable]` now due to the likelihood of being removed in
                  the future if it is found to not be very useful.

* copy_mut_lifetime - This function was also moved to `mem`, but had the same
                      treatment as `copy_lifetime`.

* copy_lifetime_vec - This function was removed because it is not used today,
                      and its existence is not necessary with DST
                      (copy_lifetime will suffice).

In summary, the cast module was stripped down to these functions, and then the
functions were moved to the `mem` module.

    transmute - #[unstable]
    transmute_copy - #[stable]
    forget - #[stable]
    copy_lifetime - #[unstable]
    copy_mut_lifetime - #[unstable]

[breaking-change]
2014-05-11 01:13:02 -07:00
Daniel Micay 138437956c initial port of the exchange allocator to jemalloc
In stage0, all allocations are 8-byte aligned. Passing a size and
alignment to free is not yet implemented everywhere (0 size and 8 align
are used as placeholders). Fixing this is part of #13994.

Closes #13616
2014-05-10 19:58:17 -04:00
bors e850316408 auto merge of #14068 : alexcrichton/rust/rustdoc-xcrate-links, r=brson
This should improve the libcore experience quite a bit when looking at the
libstd documentation.
2014-05-10 03:36:30 -07:00
Alex Crichton 620b4352f2 doc: Fix some broken links 2014-05-09 14:42:12 -07:00
bors fcf25ae83d auto merge of #14019 : brson/rust/docs, r=alexcrichton
Just small bits of polish.
2014-05-08 23:01:40 -07:00
Kevin Ballard 752048a271 Handle more fallout
os::args() no longer auto-borrows to &[~str].
2014-05-08 12:06:22 -07:00
Brian Anderson a993703f93 std: Doc typos 2014-05-07 14:12:43 -07:00
Alex Crichton 07caa22450 Test fixes and rebase conflicts 2014-05-07 11:03:12 -07:00
Alex Crichton 0d8f5fa618 core: Move Option::expect to libstd from libcore
See #14008 for more details
2014-05-07 08:17:32 -07:00
Alex Crichton f62c121eb0 core: Inherit the cell module 2014-05-07 08:16:14 -07:00
Alex Crichton c5229e5d2e core: Inhert ~/@/& cmp traits, remove old modules
This commit removes the std::{managed, reference} modules. The modules serve
essentially no purpose, and the only free function removed was `managed::ptr_eq`
which can be achieved by comparing references.

[breaking-change]
2014-05-07 08:15:58 -07:00
Alex Crichton 5592a8f5db core: Inherit the cmp module
This removes the TotalOrd and TotalEq implementation macros, they will be added
later to the numeric modules (where the other comparison implementations live).
2014-05-07 08:15:19 -07:00
Alex Crichton b024ba544c core: Inherit the iter module 2014-05-07 08:14:56 -07:00
Alex Crichton 06fcb6b1c8 core: Inherit the option module 2014-05-07 08:14:56 -07:00
Alex Crichton 6636215a44 core: Inherit the bool module 2014-05-07 08:14:56 -07:00
Alex Crichton 92095d125a core: Inherit the tuple module 2014-05-07 08:14:54 -07:00
Alex Crichton 54b81997f3 core: Inherit the clone module 2014-05-07 08:13:56 -07:00
Alex Crichton e7eed5f670 core: Inherit the unit module 2014-05-07 08:13:56 -07:00
Alex Crichton dfd967f239 core: Inherit the default module 2014-05-07 08:13:56 -07:00
Alex Crichton 17cb238ee8 core: Inherit the raw module 2014-05-07 08:13:56 -07:00
Alex Crichton 8ed728babb core: Inherit the any module 2014-05-07 08:13:56 -07:00
Alex Crichton 7192452545 core: Inherit the char module 2014-05-07 08:13:24 -07:00
Alex Crichton d9708539af core: Inherit the container module 2014-05-07 08:13:24 -07:00
Alex Crichton 2ad98fbb27 core: Inherit the ty module 2014-05-07 08:13:24 -07:00
Alex Crichton ead6e16a60 core: Inherit the ops module 2014-05-07 08:13:06 -07:00
Alex Crichton ec8a805b6d core: Inherit the kinds module 2014-05-07 08:13:06 -07:00
Alex Crichton 28624661c3 core: Inherit the cast module 2014-05-07 08:13:06 -07:00
Alex Crichton 645b157564 core: Inherit the ptr module 2014-05-07 08:13:06 -07:00
Alex Crichton dca8a0d6e4 core: Inherit the mem module 2014-05-07 08:12:48 -07:00
Alex Crichton 5b75e44fb0 core: Inherit the intrinsics module 2014-05-07 08:12:48 -07:00
Patrick Walton 090040bf40 librustc: Remove `~EXPR`, `~TYPE`, and `~PAT` from the language, except
for `~str`/`~[]`.

Note that `~self` still remains, since I forgot to add support for
`Box<self>` before the snapshot.

How to update your code:

* Instead of `~EXPR`, you should write `box EXPR`.

* Instead of `~TYPE`, you should write `Box<Type>`.

* Instead of `~PATTERN`, you should write `box PATTERN`.

[breaking-change]
2014-05-06 23:12:54 -07:00
Brendan Zabarauskas 464e375d2f Move bitflags module to libstd
This will allow us to provide type-safe APIs in libstd that are C-compatible.
2014-04-30 10:01:14 -07:00