- 04 4月, 2015 1 次提交
-
-
- 02 4月, 2015 2 次提交
-
-
由 Niko Matsakis 提交于
sidesteps a coherence difficulty where `liballoc` had to prove that `&str: !Error`, which didn't involve any local types.
-
由 Niko Matsakis 提交于
comment includes a test that also shows how it can be used.
-
- 01 4月, 2015 2 次提交
-
-
由 Alex Crichton 提交于
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.
-
由 Aaron Turon 提交于
* 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]
-
- 31 3月, 2015 1 次提交
-
-
由 Camille Roussel 提交于
Removed duplicate words
-
- 29 3月, 2015 2 次提交
-
-
由 Steven Fackler 提交于
with_end_to_cap is enormously expensive now that it's initializing memory since it involves 64k allocation + memset on every call. This is most noticable when calling read_to_end on very small readers, where the new version if **4 orders of magnitude** faster. BufReader also depended on with_end_to_cap so I've rewritten it in its original form. As a bonus, converted the buffered IO struct Debug impls to use the debug builders. Fixes #23815
-
由 Steven Fackler 提交于
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]
-
- 28 3月, 2015 3 次提交
-
-
由 Alex Crichton 提交于
Previously a panic was generated for recursive prints due to a double-borrow of a `RefCell`. This was solved by the second borrow's output being directed towards the global stdout instead of the per-thread stdout (still experimental functionality). After this functionality was altered, however, recursive prints still deadlocked due to the overridden `write_fmt` method which locked itself first and then wrote all the data. This was fixed by removing the override of the `write_fmt` method. This means that unlocked usage of `write!` on a `Stdout`/`Stderr` may be slower due to acquiring more locks, but it's easy to make more performant with a call to `.lock()`. Closes #23781
-
由 Brian Anderson 提交于
Until some backwards-compatibility hazards are fixed in #23121, these need to be unstable. [breaking-change]
-
由 Richo Healey 提交于
-
- 27 3月, 2015 5 次提交
-
-
由 Nick Cameron 提交于
-
由 Gary M. Josack 提交于
Found a few 404s that seemed like simple fixes: The Result docs use old_io Writer as an example. Fix the link to old_io Writer. There's probably an effort to update the example away from a deprecated api but this was a simple fix. rustc/plugin was pointing at the old guide and it was a broken link anyways (plugin vs plugins). Point at the book instead. The main page of the API docs referenced c_{str,vec}. Looks like these were deleted in 25d5a3a1. Point at ffi docs instead.
-
由 Alex Crichton 提交于
This commit removes compiler support for the `old_impl_check` attribute which should in theory be entirely removed now. The last remaining use of it in the standard library has been updated by moving the type parameter on the `old_io::Acceptor` trait into an associated type. As a result, this is a breaking change for all current users of the deprecated `old_io::Acceptor` trait. Code can be migrated by using the `Connection` associated type instead. [breaking-change]
-
由 Alex Crichton 提交于
Now that support has been removed, all lingering use cases are renamed.
-
由 Alex Crichton 提交于
-
- 26 3月, 2015 1 次提交
-
-
由 Felix S. Klock II 提交于
(Reviewed rest of code; did not see other `pub` items that needed such treatment.) Driveby: fix typo in comment in ptr.rs.
-
- 25 3月, 2015 2 次提交
-
-
由 Nick Cameron 提交于
-
由 Nick Cameron 提交于
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; ```
-
- 24 3月, 2015 7 次提交
-
-
由 Alex Crichton 提交于
-
由 Aaron Turon 提交于
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]
-
由 Brian Anderson 提交于
-
由 Brian Anderson 提交于
-
由 Tom Jakubowski 提交于
Impls on `clean::Type::FixedVector` are now collected in the array primitive page instead of the slice primitive page. Also add a primitive docs for arrays to `std`.
-
由 Aaron Turon 提交于
This commit implements [RFC 909](https://github.com/rust-lang/rfcs/pull/909): The `std::thread_local` module is now deprecated, and its contents are available directly in `std::thread` as `LocalKey`, `LocalKeyState`, and `ScopedKey`. The macros remain exactly as they were, which means little if any code should break. Nevertheless, this is technically a: [breaking-change] Closes #23547
-
由 Steve Klabnik 提交于
Fixes #23632
-
- 23 3月, 2015 1 次提交
-
-
由 Wangshan Lu 提交于
-
- 18 3月, 2015 1 次提交
-
-
由 Alex Crichton 提交于
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`
-
- 15 3月, 2015 1 次提交
-
-
由 Wangshan Lu 提交于
-
- 14 3月, 2015 1 次提交
-
-
由 Alex Crichton 提交于
-
- 13 3月, 2015 1 次提交
-
-
由 Alex Crichton 提交于
These were suppressing lots of interesting warnings! Turns out there was also quite a bit of dead code.
-
- 06 3月, 2015 1 次提交
-
-
由 awlnx 提交于
-
- 05 3月, 2015 1 次提交
-
-
由 Huon Wilson 提交于
This destabilises all the implementation details of `thread_local!`, since they do not *need* to be stable with the new attribute.
-
- 03 3月, 2015 1 次提交
-
-
由 Simonas Kazlauskas 提交于
Reverts a small part of c74d49c8 because compilation pukes with warnings now.
-
- 01 3月, 2015 3 次提交
-
-
由 Guillaume Gomez 提交于
-
由 Tshepang Lekhonkhobe 提交于
-
由 GuillaumeGomez 提交于
-
- 25 2月, 2015 1 次提交
-
-
由 Alex Crichton 提交于
Specifically, the following actions were taken: * The `copy_memory` and `copy_nonoverlapping_memory` functions to drop the `_memory` suffix (as it's implied by the functionality). Both functions are now marked as `#[stable]`. * The `set_memory` function was renamed to `write_bytes` and is now stable. * The `zero_memory` function is now deprecated in favor of `write_bytes` directly. * The `Unique` pointer type is now behind its own feature gate called `unique` to facilitate future stabilization. * All type parameters now are `T: ?Sized` wherever possible and new clauses were added to the `offset` functions to require that the type is sized. [breaking-change]
-
- 24 2月, 2015 1 次提交
-
-
由 Alex Crichton 提交于
-
- 21 2月, 2015 1 次提交
-
-
由 Alexis 提交于
-