Commit graph

38 commits

Author SHA1 Message Date
John Hodge
0937c10f3c libcore/Result - RFC#1119 Add an 'expect' method to Result 2015-06-15 12:00:16 +08:00
bors
a0f028da07 Auto merge of #25817 - XMPPwocky:once_cleanedup, r=alexcrichton
Closes #24443.
2015-05-30 01:12:35 +00:00
Nathaniel Theis
103e79d26a Implement RFC 771: std::iter::once 2015-05-29 12:02:13 -07:00
Niko Matsakis
2c5e784d6f add const_fn features 2015-05-29 09:42:54 -04:00
Simon Sapin
d0afa6ede3 Add map and filter_map associated functions to std::cell::Ref and RefMut
See design discussion in https://github.com/rust-lang/rust/pull/25747
2015-05-29 08:39:07 +02:00
Steven Fackler
e161d5cf73 Stabilize debug builders for 1.2.0 2015-05-19 21:57:39 -07:00
Kang Seonghoon
c82da7a54b core: added core::num::flt2dec for floating-point formatting.
This is a fork of the flt2dec portion of rust-strconv [1] with
a necessary relicensing (the original code was licensed CC0-1.0).
Each module is accompanied with large unit tests, integrated
in this commit as coretest::num::flt2dec. This module is added
in order to replace the existing core::fmt::float method.

The forked revision of rust-strconv is from 2015-04-20, with a commit ID
9adf6d3571c6764a6f240a740c823024f70dc1c7.

[1] https://github.com/lifthrasiir/rust-strconv/
2015-05-06 14:19:37 +09:00
Tamir Duberstein
69abc12b00 Register new snapshots 2015-04-28 17:23:45 -07:00
Alex Crichton
a568a7f9f2 std: Bring back f32::from_str_radix as an unstable API
This API was exercised in a few tests and mirrors the `from_str_radix`
functionality of the integer types.
2015-04-21 15:23:54 -07:00
kwantam
29d1252e4d deprecate Unicode functions that will be moved to crates.io
This patch
1. renames libunicode to librustc_unicode,
2. deprecates several pieces of libunicode (see below), and
3. removes references to deprecated functions from
   librustc_driver and libsyntax. This may change pretty-printed
   output from these modules in cases involving wide or combining
   characters used in filenames, identifiers, etc.

The following functions are marked deprecated:

1. char.width() and str.width():
   --> use unicode-width crate

2. str.graphemes() and str.grapheme_indices():
   --> use unicode-segmentation crate

3. str.nfd_chars(), str.nfkd_chars(), str.nfc_chars(), str.nfkc_chars(),
   char.compose(), char.decompose_canonical(), char.decompose_compatible(),
   char.canonical_combining_class():
   --> use unicode-normalization crate
2015-04-16 17:03:05 -04:00
Alex Crichton
d4a2c94180 std: Clean out #[deprecated] APIs
This commit cleans out a large amount of deprecated APIs from the standard
library and some of the facade crates as well, updating all users in the
compiler and in tests as it goes along.
2015-03-31 15:49:57 -07:00
Brian Anderson
1639e51f6e Feature gate *all* slice patterns. #23121
Until some backwards-compatibility hazards are fixed in #23121,
these need to be unstable.

[breaking-change]
2015-03-27 12:50:49 -07:00
Brian Anderson
df290f127e Require feature attributes, and add them where necessary 2015-03-23 14:40:26 -07:00
Steven Fackler
905a611b94 Switch to a specific feature 2015-03-11 12:58:01 -07:00
awlnx
951ef9d1f1 fix for new attributes failing. issue #22964 2015-03-05 11:53:51 -05:00
Alexis
97aa34046f try to reduce bajillion warnings 2015-02-20 19:55:00 -05:00
Manish Goregaokar
f0f8be2a2e Fix rollup (remove slicing_syntax) 2015-02-15 19:26:39 +05:30
Huon Wilson
df1ac7aa63 Deprecate in-tree rand, std::rand and #[derive(Rand)].
Use the crates.io crate `rand` (version 0.1 should be a drop in
replacement for `std::rand`) and `rand_macros` (`#[derive_Rand]` should
be a drop-in replacement).

[breaking-change]
2015-02-04 09:39:40 +11:00
Alex Crichton
3a2530d611 Test fixes and rebase conflicts
Also some tidying up of a bunch of crate attributes
2015-01-30 14:53:34 -08:00
Brian Anderson
cd6d9eab5d Set unstable feature names appropriately
* `core` - for the core crate
* `hash` - hashing
* `io` - io
* `path` - path
* `alloc` - alloc crate
* `rand` - rand crate
* `collections` - collections crate
* `std_misc` - other parts of std
* `test` - test crate
* `rustc_private` - everything else
2015-01-23 13:28:40 -08:00
Brian Anderson
7b73ec4698 Tie stability attributes to feature gates 2015-01-21 16:16:21 -08:00
Brian Anderson
6f3a80e411 Set allow(unstable) in crates that use unstable features
Lets them build with the -dev, -nightly, or snapshot compiler
2015-01-17 16:38:04 -08:00
Huon Wilson
4f5a57e80e Remove warning from the libraries.
This adds the int_uint feature to *every* library, whether or not it
needs it.
2015-01-08 11:02:23 -05:00
Alex Crichton
0dc48b47a8 Test fixes and rebase conflicts 2015-01-07 19:27:27 -08:00
Alex Crichton
7975fd9cee rollup merge of #20482: kmcallister/macro-reform
Conflicts:
	src/libflate/lib.rs
	src/libstd/lib.rs
	src/libstd/macros.rs
	src/libsyntax/feature_gate.rs
	src/libsyntax/parse/parser.rs
	src/libsyntax/show_span.rs
	src/test/auxiliary/macro_crate_test.rs
	src/test/compile-fail/lint-stability.rs
	src/test/run-pass/intrinsics-math.rs
	src/test/run-pass/tcp-connect-timeouts.rs
2015-01-05 19:01:17 -08:00
Keegan McAllister
c2e26972e3 Un-gate macro_rules 2015-01-05 18:21:14 -08:00
Jorge Aparicio
18e2026ff8 coretest: remove/ignore tests 2015-01-05 17:22:15 -05:00
Luqman Aden
0e039ada55 libcoretest: Add tests for NonZero. 2014-12-28 19:40:48 -05:00
Alex Crichton
082bfde412 Fallout of std::str stabilization 2014-12-21 23:31:42 -08:00
Steven Fackler
24a8ef63ff Move hash module from collections to core 2014-12-15 22:48:54 -08:00
Jorge Aparicio
47acce498a libcoretest: fix fallout in unit tests 2014-12-13 17:03:45 -05:00
Nick Cameron
2d3823441f Put slicing syntax behind a feature gate.
[breaking-change]

If you are using slicing syntax you will need to add #![feature(slicing_syntax)] to your crate.
2014-10-07 15:49:53 +13:00
Aaron Turon
7bf56df4c8 Revert "Put slicing syntax behind a feature gate."
This reverts commit 95cfc35607.
2014-10-02 11:47:51 -07:00
Nick Cameron
95cfc35607 Put slicing syntax behind a feature gate.
[breaking-change]

If you are using slicing syntax you will need to add #![feature(slicing_syntax)] to your crate.
2014-10-02 13:23:36 +13:00
nham
3b0084e834 Add a test for the fix of issue 16589 2014-08-19 00:37:34 -04:00
Brian Anderson
a4b354ca02 core: Add binary_search and binary_search_elem methods to slices.
These are like the existing bsearch methods but if the search fails,
it returns the next insertion point.

The new `binary_search` returns a `BinarySearchResult` that is either
`Found` or `NotFound`. For convenience, the `found` and `not_found`
methods convert to `Option`, ala `Result`.

Deprecate bsearch and bsearch_elem.
2014-08-13 11:30:15 -07:00
Aaron Turon
68bde0a073 stabilize atomics (now atomic)
This commit stabilizes the `std::sync::atomics` module, renaming it to
`std::sync::atomic` to match library precedent elsewhere, and tightening
up behavior around incorrect memory ordering annotations.

The vast majority of the module is now `stable`. However, the
`AtomicOption` type has been deprecated, since it is essentially unused
and is not truly a primitive atomic type. It will eventually be replaced
by a higher-level abstraction like MVars.

Due to deprecations, this is a:

[breaking-change]
2014-08-04 16:03:21 -07:00
Steven Fackler
1ed646eaf7 Extract tests from libcore to a separate crate
Libcore's test infrastructure is complicated by the fact that many lang
items are defined in the crate. The current approach (realcore/realstd
imports) is hacky and hard to work with (tests inside of core::cmp
haven't been run for months!).

Moving tests to a separate crate does mean that they can only test the
public API of libcore, but I don't feel that that is too much of an
issue. The only tests that I had to get rid of were some checking the
various numeric formatters, but those are also exercised through normal
format! calls in other tests.
2014-06-29 15:57:21 -07:00