summary refs log tree commit diff
path: root/src/libserialize
AgeCommit message (Collapse)AuthorLines
2015-07-30Auto merge of #26734 - Gankro:deprecate-vecmap, r=alexcrichtonbors-0/+3
VecMap doesn't really fit with the current standard library's strategy (small!). I've mirrored the code to https://github.com/contain-rs/vec-map but @GBGamer has already claimed the name on crates.io a couple months ago for the same purpose. It hasn't been updated since, though. CC @rust-lang/libs
2015-07-29deprecate vecmapAlexis Beingessner-0/+3
2015-07-27Show appropriate feature flags in docsSteve Klabnik-2/+4
2015-06-17More test fixes and fallout of stability changesAlex Crichton-1/+0
2015-06-17std: Split the `std_misc` featureAlex Crichton-2/+2
2015-06-17collections: Split the `collections` featureAlex Crichton-0/+2
This commit also deprecates the `as_string` and `as_slice` free functions in the `string` and `vec` modules.
2015-06-17core: Split apart the global `core` featureAlex Crichton-2/+3
This commit shards the broad `core` feature of the libcore library into finer grained features. This split groups together similar APIs and enables tracking each API separately, giving a better sense of where each feature is within the stabilization process. A few minor APIs were deprecated along the way: * Iterator::reverse_in_place * marker::NoCopy
2015-06-08Replace usage of String::from_str with String:fromSimon Sapin-1/+1
2015-05-30fix documentation in libserializebenaryorg-1/+1
the object was serialized with an 'i' but the comment stated the print command would output 'j'
2015-05-15libs: Move favicon URLs to HTTPSAlex Crichton-1/+1
Helps prevent mixed content warnings if accessing docs over HTTPS. Closes #25459
2015-05-06test: update tests for flt2dec fallouts.Kang Seonghoon-2/+2
2015-04-21rollup merge of #24636: alexcrichton/remove-deprecatedAlex Crichton-18/+10
Conflicts: src/libcore/result.rs
2015-04-21rollup merge of #24651: tamird/old-referencesAlex Crichton-1/+1
r? @alexcrichton
2015-04-21std: Remove deprecated/unstable num functionalityAlex Crichton-18/+10
This commit removes all the old casting/generic traits from `std::num` that are no longer in use by the standard library. This additionally removes the old `strconv` module which has not seen much use in quite a long time. All generic functionality has been supplanted with traits in the `num` crate and the `strconv` module is supplanted with the [rust-strconv crate][rust-strconv]. [rust-strconv]: https://github.com/lifthrasiir/rust-strconv This is a breaking change due to the removal of these deprecated crates, and the alternative crates are listed above. [breaking-change]
2015-04-21Remove references to `old_{path,io}`Tamir Duberstein-1/+1
2015-04-21Model lexer: Fix remaining issuesPiotr Czarnecki-2/+0
2015-04-18Auto merge of #24428 - kwantam:deprecate_unicode_fns, r=alexcrichtonbors-3/+3
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-17Workaround deliberate overflowing negation in serialize::json.Felix S. Klock II-1/+1
2015-04-16deprecate Unicode functions that will be moved to crates.iokwantam-3/+3
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-14Positive case of `len()` -> `is_empty()`Tamir Duberstein-1/+1
`s/(?<!\{ self)(?<=\.)len\(\) == 0/is_empty()/g`
2015-04-14test: Fixup many library unit testsAlex Crichton-4/+2
2015-04-14std: Remove old_io/old_path/rand modulesAlex Crichton-33/+0
This commit entirely removes the old I/O, path, and rand modules. All functionality has been deprecated and unstable for quite some time now!
2015-04-01Fallout in public-facing and semi-public-facing libsNiko Matsakis-2/+2
2015-03-31rollup merge of #23879: seanmonstar/del-from-errorAlex Crichton-2/+2
Conflicts: src/libcore/error.rs
2015-03-31rollup merge of #23875: aturon/revise-convert-2Alex Crichton-1/+0
* Marks `#[stable]` the contents of the `std::convert` module. * Added methods `PathBuf::as_path`, `OsString::as_os_str`, `String::as_str`, `Vec::{as_slice, as_mut_slice}`. * Deprecates `OsStr::from_str` in favor of a new, stable, and more general `OsStr::new`. * Adds unstable methods `OsString::from_bytes` and `OsStr::{to_bytes, to_cstring}` for ergonomic FFI usage. [breaking-change] r? @alexcrichton
2015-03-31rollup merge of #23886: demelev/remove_as_slice_usageAlex Crichton-1/+1
2015-03-31Stabilize `std::convert` and related codeAaron Turon-1/+0
* Marks `#[stable]` the contents of the `std::convert` module. * Added methods `PathBuf::as_path`, `OsString::as_os_str`, `String::as_str`, `Vec::{as_slice, as_mut_slice}`. * Deprecates `OsStr::from_str` in favor of a new, stable, and more general `OsStr::new`. * Adds unstable methods `OsString::from_bytes` and `OsStr::{to_bytes, to_cstring}` for ergonomic FFI usage. [breaking-change]
2015-03-31Stabilize std::numAaron Turon-0/+3
This commit stabilizes the `std::num` module: * The `Int` and `Float` traits are deprecated in favor of (1) the newly-added inherent methods and (2) the generic traits available in rust-lang/num. * The `Zero` and `One` traits are reintroduced in `std::num`, which together with various other traits allow you to recover the most common forms of generic programming. * The `FromStrRadix` trait, and associated free function, is deprecated in favor of inherent implementations. * A wide range of methods and constants for both integers and floating point numbers are now `#[stable]`, having been adjusted for integer guidelines. * `is_positive` and `is_negative` are renamed to `is_sign_positive` and `is_sign_negative`, in order to address #22985 * The `Wrapping` type is moved to `std::num` and stabilized; `WrappingOps` is deprecated in favor of inherent methods on the integer types, and direct implementation of operations on `Wrapping<X>` for each concrete integer type `X`. Closes #22985 Closes #21069 [breaking-change]
2015-03-30convert: remove FromError, use From<E> insteadSean McArthur-2/+2
This removes the FromError trait, since it can now be expressed using the new convert::Into trait. All implementations of FromError<E> where changed to From<E>, and `try!` was changed to use From::from instead. Because this removes FromError, it is a breaking change, but fixing it simply requires changing the words `FromError` to `From`, and `from_error` to `from`. [breaking-change]
2015-03-31replace deprecated as_slice()Emeliov Dmitrii-1/+1
2015-03-28Rollup merge of #23803 - richo:unused-braces, r=ManishearthManish Goregaokar-1/+1
Pretty much what it says on the tin.
2015-03-28cleanup: Remove unused braces in use statementsRicho Healey-1/+1
2015-03-27rollup merge of #23741: alexcrichton/remove-int-uintAlex Crichton-145/+144
Conflicts: src/librustc/middle/ty.rs src/librustc_trans/trans/adt.rs src/librustc_typeck/check/mod.rs src/libserialize/json.rs src/test/run-pass/spawn-fn.rs
2015-03-27rollup merge of #23738: alexcrichton/snapshotsAlex Crichton-23/+0
Conflicts: src/libcollections/vec.rs
2015-03-27Change the trivial cast lints to allow by defaultNick Cameron-2/+0
2015-03-26Mass rename uint/int to usize/isizeAlex Crichton-148/+147
Now that support has been removed, all lingering use cases are renamed.
2015-03-26Register new snapshotsAlex Crichton-23/+0
2015-03-25Change lint names to pluralsNick Cameron-2/+2
2015-03-25Add trivial cast lints.Nick Cameron-2/+8
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-23rollup merge of #23598: brson/gateAlex Crichton-1/+3
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 #23601: nikomatsakis/by-value-indexAlex Crichton-0/+23
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-23Add generic conversion traitsAaron Turon-1/+2
This commit: * Introduces `std::convert`, providing an implementation of RFC 529. * Deprecates the `AsPath`, `AsOsStr`, and `IntoBytes` traits, all in favor of the corresponding generic conversion traits. Consequently, various IO APIs now take `AsRef<Path>` rather than `AsPath`, and so on. Since the types provided by `std` implement both traits, this should cause relatively little breakage. * Deprecates many `from_foo` constructors in favor of `from`. * Changes `PathBuf::new` to take no argument (creating an empty buffer, as per convention). The previous behavior is now available as `PathBuf::from`. * De-stabilizes `IntoCow`. It's not clear whether we need this separate trait. Closes #22751 Closes #14433 [breaking-change]
2015-03-23Add #![feature] attributes to doctestsBrian Anderson-0/+2
2015-03-23Require feature attributes, and add them where necessaryBrian Anderson-1/+1
2015-03-23Adjust Index/IndexMut impls. For generic collections, we takeNiko Matsakis-0/+23
references. For collections whose keys are integers, we take both references and by-value.
2015-03-20std: Remove old_io/old_path from the preludeAlex Crichton-1/+2
This commit removes the reexports of `old_io` traits as well as `old_path` types and traits from the prelude. This functionality is now all deprecated and needs to be removed to make way for other functionality like `Seek` in the `std::io` module (currently reexported as `NewSeek` in the io prelude). Closes #23377 Closes #23378
2015-03-19std: Stablize io::ErrorKindAlex Crichton-1/+0
This commit stabilizes the `ErrorKind` enumeration which is consumed by and generated by the `io::Error` type. The purpose of this type is to serve as a cross-platform namespace to categorize errors into. Two specific issues are addressed as part of this stablization: * The naming of each variant was scrutinized and some were tweaked. An example is how `FileNotFound` was renamed to simply `NotFound`. These names should not show either a Unix or Windows bias and the set of names is intended to grow over time. For now the names will likely largely consist of those errors generated by the I/O APIs in the standard library. * The mapping of OS error codes onto kinds has been altered. Coalescing no longer occurs (multiple error codes become one kind). It is intended that each OS error code, if bound, corresponds to only one `ErrorKind`. The current set of error kinds was expanded slightly to include some networking errors. This commit also adds a `raw_os_error` function which returns an `Option<i32>` to extract the underlying raw error code from the `Error`.
2015-03-18Register new snapshotsAlex Crichton-2/+0
2015-03-17std: Tweak some unstable features of `str`Alex Crichton-0/+1
This commit clarifies some of the unstable features in the `str` module by moving them out of the blanket `core` and `collections` features. The following methods were moved to the `str_char` feature which generally encompasses decoding specific characters from a `str` and dealing with the result. It is unclear if any of these methods need to be stabilized for 1.0 and the most conservative route for now is to continue providing them but to leave them as unstable under a more specific name. * `is_char_boundary` * `char_at` * `char_range_at` * `char_at_reverse` * `char_range_at_reverse` * `slice_shift_char` The following methods were moved into the generic `unicode` feature as they are specifically enabled by the `unicode` crate itself. * `nfd_chars` * `nfkd_chars` * `nfc_chars` * `graphemes` * `grapheme_indices` * `width`
2015-03-17Rollup merge of #23329 - jbcrail:rm-syntax-highlight, r=sanxiynManish Goregaokar-2/+2
As suggested by @steveklabnik in #23254, I removed the redundant Rust syntax highlighting from the documentation.