- 19 2月, 2015 10 次提交
-
-
由 Aaron Turon 提交于
This commit stabilizes `std::borrow`, making the following modifications to catch up the API with language changes: * It renames `BorrowFrom` to `Borrow`, as was originally intended (but blocked for technical reasons), and reorders the parameters accordingly. * It moves the type parameter of `ToOwned` to an associated type. This is somewhat less flexible, in that each borrowed type must have a unique owned type, but leads to a significant simplification for `Cow`. Flexibility can be regained by using newtyped slices, which is advisable for other reasons anyway. * It removes the owned type parameter from `Cow`, making the type much less verbose. * Deprecates the `is_owned` and `is_borrowed` predicates in favor of direct matching. The above API changes are relatively minor; the basic functionality remains the same, and essentially the whole module is now marked `#[stable]`. [breaking-change]
-
由 Niko Matsakis 提交于
-
由 Niko Matsakis 提交于
-
由 Niko Matsakis 提交于
that it produces "outlives" relations for associated types. Add several tests relating to #22246.
-
由 Niko Matsakis 提交于
parameter environments so that it can be used elsewhere.
-
由 Niko Matsakis 提交于
-
由 Niko Matsakis 提交于
-
由 Niko Matsakis 提交于
`no_late_bound_regions().unwrap()`, which allows us to write code that doesn't necessarily *fail* when there are higher-ranked trait bounds.
-
由 Niko Matsakis 提交于
-
由 Niko Matsakis 提交于
-
- 18 2月, 2015 30 次提交
-
-
由 Huon Wilson 提交于
One windows bot failed spuriously.
-
由 Alex Crichton 提交于
-
由 Alex Crichton 提交于
-
由 Alex Crichton 提交于
Conflicts: src/libstd/sync/task_pool.rs src/libstd/thread.rs src/libtest/lib.rs src/test/bench/shootout-reverse-complement.rs src/test/bench/shootout-spectralnorm.rs
-
由 Alex Crichton 提交于
-
由 Alex Crichton 提交于
Requested by Niko in #22200 (and is good to have anyway)
-
由 Alex Crichton 提交于
Conflicts: src/test/bench/rt-messaging-ping-pong.rs src/test/bench/rt-parfib.rs src/test/bench/task-perf-spawnalot.rs
-
由 Alex Crichton 提交于
An "immutable reference-counted pointer" is confusing, one might think that the `Rc` itself is immutable which isn't the case. cf. http://www.reddit.com/r/rust/comments/2w75wr/how_do_i_read_immutable_vector_inside_a_spawned/coo6mm2
-
由 Alex Crichton 提交于
Conflicts: src/rustbook/main.rs
-
由 Alex Crichton 提交于
FIxes #22361
-
由 Alex Crichton 提交于
Noticed in #22429
-
由 Alex Crichton 提交于
Implement `Vec::from_elem` by making the `vec![element; len]` macro more powerful (see rust-lang/rfcs#832). Closes #22414 r? @Gankro
-
由 Alex Crichton 提交于
Now that the necessary associated types exist for the `IntoIterator` trait this commit stabilizes the trait as-is as well as all existing implementations.
-
由 Alex Crichton 提交于
-
由 Alex Crichton 提交于
The `connect_error` test check if connecting to "0.0.0.0:1" works (it shouldn't). And in case of error, the test expects a `ConnectionRefused` error. Under OpenBSD, trying to connect to "0.0.0.0" isn't a `ConnectionRefused`: it is an `InvalidInput` error. The patch allow the error to be `ConnectionRefused` or `InvalidInput`. Another possibility is to check connecting to "127.0.0.1:1" and expects only `ConnectionRefused` error.
-
由 Alex Crichton 提交于
Fixes the crash blocking #21886.
-
由 Alex Crichton 提交于
Fixes #19315 r? @aturon
-
由 Huon Wilson 提交于
-
由 Alex Crichton 提交于
Requested by Niko in #22200 (and is good to have anyway)
-
由 Aaron Turon 提交于
-
由 Alex Crichton 提交于
This commit exposes the `is_sep` function and `MAIN_SEP` constant, as well as Windows path prefixes. The path prefix enum is safely exposed on all platforms, but it only yielded as a component for Windows. Exposing the prefix enum as part of prefix components involved changing the type from `OsStr` to the `Prefix` enum, which is a: [breaking-change]
-
由 Alex Crichton 提交于
This aligns json target specification to match terminology used elsewhere in the code base. [breaking-change] for custom target json users. Change all appearances of target-word-size to target-pointer-width.
-
由 Alex Crichton 提交于
Closes #21859.
-
由 Alex Crichton 提交于
* Move the type parameter on the `AsciiExt` trait to an associated type named `Owned`. * Move `ascii::escape_default` to using an iterator. This is a breaking change due to the removal of the type parameter on the `AsciiExt` trait as well as the modifications to the `escape_default` function to returning an iterator. Manual implementations of `AsciiExt` (or `AsciiExt` bounds) should be adjusted to remove the type parameter and using the new `escape_default` should be relatively straightforward. [breaking-change]
-
由 Aaron Turon 提交于
This commit makes several changes to `std::thread` in preparation for final stabilization: * It removes the ability to handle panics from `scoped` children; see #20807 for discussion * It adds a `JoinHandle` structure, now returned from `spawn`, which makes it possible to join on children that do not share data from their parent's stack. The child is automatically detached when the handle is dropped, and the handle cannot be copied due to Posix semantics. * It moves all static methods from `std::thread::Thread` to free functions in `std::thread`. This was done in part because, due to the above changes, there are effectively no direct `Thread` constructors, and the static methods have tended to feel a bit awkward. * Adds an `io::Result` around the `Builder` methods `scoped` and `spawn`, making it possible to handle OS errors when creating threads. The convenience free functions entail an unwrap. * Stabilizes the entire module. Despite the fact that the API is changing somewhat here, this is part of a long period of baking and the changes are addressing all known issues prior to alpha2. If absolutely necessary, further breaking changes can be made prior to beta. Closes #20807 [breaking-change]
-
由 Alex Crichton 提交于
This commit renames the features for the `std::old_io` and `std::old_path` modules to `old_io` and `old_path` to help facilitate migration to the new APIs. This is a breaking change as crates which mention the old feature names now need to be renamed to use the new feature names. [breaking-change]
-
由 Alex Crichton 提交于
This commit performs a stabilization pass over the `std::ascii` module taking the following actions: * the module name is now stable * `AsciiExt` is now stable after moving its type parameter to an `Owned` associated type * `AsciiExt::is_ascii` is now stable * `AsciiExt::to_ascii_uppercase` is now stable * `AsciiExt::to_ascii_lowercase` is now stable * `AsciiExt::eq_ignore_ascii_case` is now stable * `AsciiExt::make_ascii_uppercase` is added to possibly replace `OwnedAsciiExt::into_ascii_uppercase` (similarly for lowercase variants). * `escape_default` now returns an iterator and is stable * `EscapeDefault` is now stable Trait implementations are now also marked stable. Primarily it is still unstable to *implement* the `AsciiExt` trait due to it containing some unstable methods. [breaking-change]
-
由 Alex Crichton 提交于
Previously an implementation of a stable trait allows implementations of unstable methods. This updates the stability pass to ensure that all items of an impl block of a trait are indeed stable on the trait itself.
-
由 Huon Wilson 提交于
The lifetime was previously, incorrectly unconstrained.
-
由 Huon Wilson 提交于
-