<feed xmlns='http://www.w3.org/2005/Atom'>
<title>rust/src/libstd/io/process.rs, branch try</title>
<subtitle>https://github.com/rust-lang/rust
</subtitle>
<id>http://git.dreamy.place/mirrors/rust/atom?h=try</id>
<link rel='self' href='http://git.dreamy.place/mirrors/rust/atom?h=try'/>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/'/>
<updated>2015-01-27T00:01:16+00:00</updated>
<entry>
<title>std: Rename io to old_io</title>
<updated>2015-01-27T00:01:16+00:00</updated>
<author>
<name>Alex Crichton</name>
<email>alex@alexcrichton.com</email>
</author>
<published>2015-01-23T00:27:48+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=f72b1645103e12b581f7022b893c37b5fe41aef7'/>
<id>urn:sha1:f72b1645103e12b581f7022b893c37b5fe41aef7</id>
<content type='text'>
In preparation for the I/O rejuvination of the standard library, this commit
renames the current `io` module to `old_io` in order to make room for the new
I/O modules. It is expected that the I/O RFCs will land incrementally over time
instead of all at once, and this provides a fresh clean path for new modules to
enter into as well as guaranteeing that all old infrastructure will remain in
place for some time.

As each `old_io` module is replaced it will be deprecated in-place for new
structures in `std::{io, fs, net}` (as appropriate).

This commit does *not* leave a reexport of `old_io as io` as the deprecation
lint does not currently warn on this form of use. This is quite a large breaking
change for all imports in existing code, but all functionality is retained
precisely as-is and path statements simply need to be renamed from `io` to
`old_io`.

[breaking-change]
</content>
</entry>
<entry>
<title>rollup merge of #21457: alexcrichton/issue-21436</title>
<updated>2015-01-21T17:20:35+00:00</updated>
<author>
<name>Alex Crichton</name>
<email>alex@alexcrichton.com</email>
</author>
<published>2015-01-21T17:20:35+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=87c3ee861ec488827044e07d5d0cd7c8508c681f'/>
<id>urn:sha1:87c3ee861ec488827044e07d5d0cd7c8508c681f</id>
<content type='text'>
Conflicts:
	src/liballoc/boxed.rs
	src/librustc/middle/traits/error_reporting.rs
	src/libstd/sync/mpsc/mod.rs
</content>
</entry>
<entry>
<title>std: Rename Show/String to Debug/Display</title>
<updated>2015-01-21T06:36:13+00:00</updated>
<author>
<name>Alex Crichton</name>
<email>alex@alexcrichton.com</email>
</author>
<published>2015-01-20T23:45:07+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=3cb9fa26ef9905c00a29ea577fb55a12a91c8e7b'/>
<id>urn:sha1:3cb9fa26ef9905c00a29ea577fb55a12a91c8e7b</id>
<content type='text'>
This commit is an implementation of [RFC 565][rfc] which is a stabilization of
the `std::fmt` module and the implementations of various formatting traits.
Specifically, the following changes were performed:

[rfc]: https://github.com/rust-lang/rfcs/blob/master/text/0565-show-string-guidelines.md

* The `Show` trait is now deprecated, it was renamed to `Debug`
* The `String` trait is now deprecated, it was renamed to `Display`
* Many `Debug` and `Display` implementations were audited in accordance with the
  RFC and audited implementations now have the `#[stable]` attribute
  * Integers and floats no longer print a suffix
  * Smart pointers no longer print details that they are a smart pointer
  * Paths with `Debug` are now quoted and escape characters
* The `unwrap` methods on `Result` now require `Display` instead of `Debug`
* The `Error` trait no longer has a `detail` method and now requires that
  `Display` must be implemented. With the loss of `String`, this has moved into
  libcore.
* `impl&lt;E: Error&gt; FromError&lt;E&gt; for Box&lt;Error&gt;` now exists
* `derive(Show)` has been renamed to `derive(Debug)`. This is not currently
  warned about due to warnings being emitted on stage1+

While backwards compatibility is attempted to be maintained with a blanket
implementation of `Display` for the old `String` trait (and the same for
`Show`/`Debug`) this is still a breaking change due to primitives no longer
implementing `String` as well as modifications such as `unwrap` and the `Error`
trait. Most code is fairly straightforward to update with a rename or tweaks of
method calls.

[breaking-change]
Closes #21436
</content>
</entry>
<entry>
<title>Register snapshot for 9006c3c</title>
<updated>2015-01-20T21:15:44+00:00</updated>
<author>
<name>Flavio Percoco</name>
<email>flaper87@gmail.com</email>
</author>
<published>2015-01-20T14:51:09+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=cd631c6914d384538352604059a7e4abb31d8c46'/>
<id>urn:sha1:cd631c6914d384538352604059a7e4abb31d8c46</id>
<content type='text'>
</content>
</entry>
<entry>
<title>use UFCS in `#[deriving(Hash)]`</title>
<updated>2015-01-14T23:41:27+00:00</updated>
<author>
<name>Jorge Aparicio</name>
<email>japaricious@gmail.com</email>
</author>
<published>2015-01-14T23:22:16+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=59e9cfa0cf66b92c05dc19c28dc6eb95cf2e4a67'/>
<id>urn:sha1:59e9cfa0cf66b92c05dc19c28dc6eb95cf2e4a67</id>
<content type='text'>
expansion now uses `::std::hash::Hash::hash(&amp;*__self_0_0, __arg_0)` instead of
`(*__self_0_0).hash(__arg_0)`

closes #21160
</content>
</entry>
<entry>
<title>Improvements to feature staging</title>
<updated>2015-01-08T11:07:23+00:00</updated>
<author>
<name>Brian Anderson</name>
<email>banderson@mozilla.com</email>
</author>
<published>2015-01-07T23:48:16+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=1f70acbf4c4f345265a7626bd927187d3bfed91f'/>
<id>urn:sha1:1f70acbf4c4f345265a7626bd927187d3bfed91f</id>
<content type='text'>
This gets rid of the 'experimental' level, removes the non-staged_api
case (i.e. stability levels for out-of-tree crates), and lets the
staged_api attributes use 'unstable' and 'deprecated' lints.

This makes the transition period to the full feature staging design
a bit nicer.
</content>
</entry>
<entry>
<title>rollup merge of #20708: aturon/new-int-modules</title>
<updated>2015-01-08T01:18:01+00:00</updated>
<author>
<name>Alex Crichton</name>
<email>alex@alexcrichton.com</email>
</author>
<published>2015-01-08T01:18:01+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=dd38f46d71872fba50833fd22313ef49eb01d079'/>
<id>urn:sha1:dd38f46d71872fba50833fd22313ef49eb01d079</id>
<content type='text'>
Conflicts:
	src/libserialize/lib.rs
</content>
</entry>
<entry>
<title>std: Stabilize the std::hash module</title>
<updated>2015-01-07T20:18:08+00:00</updated>
<author>
<name>Alex Crichton</name>
<email>alex@alexcrichton.com</email>
</author>
<published>2014-12-09T20:37:23+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=511f0b8a3de5a166fc96aba5170782c9abf92101'/>
<id>urn:sha1:511f0b8a3de5a166fc96aba5170782c9abf92101</id>
<content type='text'>
This commit aims to prepare the `std::hash` module for alpha by formalizing its
current interface whileholding off on adding `#[stable]` to the new APIs.  The
current usage with the `HashMap` and `HashSet` types is also reconciled by
separating out composable parts of the design. The primary goal of this slight
redesign is to separate the concepts of a hasher's state from a hashing
algorithm itself.

The primary change of this commit is to separate the `Hasher` trait into a
`Hasher` and a `HashState` trait. Conceptually the old `Hasher` trait was
actually just a factory for various states, but hashing had very little control
over how these states were used. Additionally the old `Hasher` trait was
actually fairly unrelated to hashing.

This commit redesigns the existing `Hasher` trait to match what the notion of a
`Hasher` normally implies with the following definition:

    trait Hasher {
        type Output;
        fn reset(&amp;mut self);
        fn finish(&amp;self) -&gt; Output;
    }

This `Hasher` trait emphasizes that hashing algorithms may produce outputs other
than a `u64`, so the output type is made generic. Other than that, however, very
little is assumed about a particular hasher. It is left up to implementors to
provide specific methods or trait implementations to feed data into a hasher.

The corresponding `Hash` trait becomes:

    trait Hash&lt;H: Hasher&gt; {
        fn hash(&amp;self, &amp;mut H);
    }

The old default of `SipState` was removed from this trait as it's not something
that we're willing to stabilize until the end of time, but the type parameter is
always required to implement `Hasher`. Note that the type parameter `H` remains
on the trait to enable multidispatch for specialization of hashing for
particular hashers.

Note that `Writer` is not mentioned in either of `Hash` or `Hasher`, it is
simply used as part `derive` and the implementations for all primitive types.

With these definitions, the old `Hasher` trait is realized as a new `HashState`
trait in the `collections::hash_state` module as an unstable addition for
now. The current definition looks like:

    trait HashState {
        type Hasher: Hasher;
        fn hasher(&amp;self) -&gt; Hasher;
    }

The purpose of this trait is to emphasize that the one piece of functionality
for implementors is that new instances of `Hasher` can be created.  This
conceptually represents the two keys from which more instances of a
`SipHasher` can be created, and a `HashState` is what's stored in a
`HashMap`, not a `Hasher`.

Implementors of custom hash algorithms should implement the `Hasher` trait, and
only hash algorithms intended for use in hash maps need to implement or worry
about the `HashState` trait.

The entire module and `HashState` infrastructure remains `#[unstable]` due to it
being recently redesigned, but some other stability decision made for the
`std::hash` module are:

* The `Writer` trait remains `#[experimental]` as it's intended to be replaced
  with an `io::Writer` (more details soon).
* The top-level `hash` function is `#[unstable]` as it is intended to be generic
  over the hashing algorithm instead of hardwired to `SipHasher`
* The inner `sip` module is now private as its one export, `SipHasher` is
  reexported in the `hash` module.

And finally, a few changes were made to the default parameters on `HashMap`.

* The `RandomSipHasher` default type parameter was renamed to `RandomState`.
  This renaming emphasizes that it is not a hasher, but rather just state to
  generate hashers. It also moves away from the name "sip" as it may not always
  be implemented as `SipHasher`. This type lives in the
  `std::collections::hash_map` module as `#[unstable]`

* The associated `Hasher` type of `RandomState` is creatively called...
  `Hasher`! This concrete structure lives next to `RandomState` as an
  implemenation of the "default hashing algorithm" used for a `HashMap`. Under
  the hood this is currently implemented as `SipHasher`, but it draws an
  explicit interface for now and allows us to modify the implementation over
  time if necessary.

There are many breaking changes outlined above, and as a result this commit is
a:

[breaking-change]
</content>
</entry>
<entry>
<title>Register new snapshots</title>
<updated>2015-01-07T18:27:52+00:00</updated>
<author>
<name>Alex Crichton</name>
<email>alex@alexcrichton.com</email>
</author>
<published>2015-01-07T18:27:52+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=b53e9f17d336bc3550ab2c5eda503bd9e719e94f'/>
<id>urn:sha1:b53e9f17d336bc3550ab2c5eda503bd9e719e94f</id>
<content type='text'>
</content>
</entry>
<entry>
<title>rollup merge of #20615: aturon/stab-2-thread</title>
<updated>2015-01-06T23:38:38+00:00</updated>
<author>
<name>Alex Crichton</name>
<email>alex@alexcrichton.com</email>
</author>
<published>2015-01-06T23:38:38+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=36f5d122b80682de473aeda2e20f14b6ceb86d74'/>
<id>urn:sha1:36f5d122b80682de473aeda2e20f14b6ceb86d74</id>
<content type='text'>
This commit takes a first pass at stabilizing `std::thread`:

* It removes the `detach` method in favor of two constructors -- `spawn`
  for detached threads, `scoped` for "scoped" (i.e., must-join)
  threads. This addresses some of the surprise/frustrating debug
  sessions with the previous API, in which `spawn` produced a guard that
  on destruction joined the thread (unless `detach` was called).

  The reason to have the division in part is that `Send` will soon not
  imply `'static`, which means that `scoped` thread creation can take a
  closure over *shared stack data* of the parent thread. On the other
  hand, this means that the parent must not pop the relevant stack
  frames while the child thread is running. The `JoinGuard` is used to
  prevent this from happening by joining on drop (if you have not
  already explicitly `join`ed.) The APIs around `scoped` are
  future-proofed for the `Send` changes by taking an additional lifetime
  parameter. With the current definition of `Send`, this is forced to be
  `'static`, but when `Send` changes these APIs will gain their full
  flexibility immediately.

  Threads that are `spawn`ed, on the other hand, are detached from the
  start and do not yield an RAII guard.

  The hope is that, by making `scoped` an explicit opt-in with a very
  suggestive name, it will be drastically less likely to be caught by a
  surprising deadlock due to an implicit join at the end of a scope.

* The module itself is marked stable.

* Existing methods other than `spawn` and `scoped` are marked stable.

The migration path is:

```rust
Thread::spawn(f).detached()
```

becomes

```rust
Thread::spawn(f)
```

while

```rust
let res = Thread::spawn(f);
res.join()
```

becomes

```rust
let res = Thread::scoped(f);
res.join()
```

[breaking-change]
</content>
</entry>
</feed>
