<feed xmlns='http://www.w3.org/2005/Atom'>
<title>rust/src/test/run-pass/coherence-iterator-vec-any-elem.rs, branch 1.2.0</title>
<subtitle>https://github.com/rust-lang/rust
</subtitle>
<id>http://git.dreamy.place/mirrors/rust/atom?h=1.2.0</id>
<link rel='self' href='http://git.dreamy.place/mirrors/rust/atom?h=1.2.0'/>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/'/>
<updated>2015-03-24T21:55:15+00:00</updated>
<entry>
<title>rustc: Add support for `extern crate foo as bar`</title>
<updated>2015-03-24T21:55:15+00:00</updated>
<author>
<name>Alex Crichton</name>
<email>alex@alexcrichton.com</email>
</author>
<published>2015-03-19T22:39:03+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=eb2f1d925ffdb79d45c7b74cef549e54533c3951'/>
<id>urn:sha1:eb2f1d925ffdb79d45c7b74cef549e54533c3951</id>
<content type='text'>
The compiler will now issue a warning for crates that have syntax of the form
`extern crate "foo" as bar`, but it will still continue to accept this syntax.
Additionally, the string `foo-bar` will match the crate name `foo_bar` to assist
in the transition period as well.

This patch will land hopefully in tandem with a Cargo patch that will start
translating all crate names to have underscores instead of hyphens.

cc #23533
</content>
</entry>
<entry>
<title>rustdoc: Replace no-pretty-expanded with pretty-expanded</title>
<updated>2015-03-23T21:40:26+00:00</updated>
<author>
<name>Brian Anderson</name>
<email>banderson@mozilla.com</email>
</author>
<published>2015-03-22T20:13:15+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=8c93a79e387f5197e8b8fe73b3d87d2b101b7c4a'/>
<id>urn:sha1:8c93a79e387f5197e8b8fe73b3d87d2b101b7c4a</id>
<content type='text'>
Now that features must be declared expanded source often does not compile.
This adds 'pretty-expanded' to a bunch of test cases that still work.
</content>
</entry>
<entry>
<title>Implement new orphan rule that requires that impls of remote traits meet the following two criteria:</title>
<updated>2015-01-05T22:17:26+00:00</updated>
<author>
<name>Niko Matsakis</name>
<email>niko@alum.mit.edu</email>
</author>
<published>2015-01-05T01:35:06+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=6e68fd09edc7ed37fd76f703247b5410cd338bfe'/>
<id>urn:sha1:6e68fd09edc7ed37fd76f703247b5410cd338bfe</id>
<content type='text'>
- the self type includes some local type; and,
- type parameters in the self type must be constrained by a local type.

A type parameter is called *constrained* if it appears in some type-parameter of a local type.

Here are some examples that are accepted. In all of these examples, I
assume that `Foo` is a trait defined in another crate. If `Foo` were
defined in the local crate, then all the examples would be legal.

- `impl Foo for LocalType`
- `impl&lt;T&gt; Foo&lt;T&gt; for LocalType` -- T does not appear in Self, so it is OK
- `impl&lt;T&gt; Foo&lt;T&gt; for LocalType&lt;T&gt;` -- T here is constrained by LocalType
- `impl&lt;T&gt; Foo&lt;T&gt; for (LocalType&lt;T&gt;, T)` -- T here is constrained by LocalType

Here are some illegal examples (again, these examples assume that
`Foo` is not local to the current crate):

- `impl Foo for int` -- the Self type is not local
- `impl&lt;T&gt; Foo for T` -- T appears in Self unconstrained by a local type
- `impl&lt;T&gt; Foo for (LocalType, T)` -- T appears in Self unconstrained by a local type

This is a [breaking-change]. For the time being, you can opt out of
the new rules by placing `#[old_orphan_check]` on the trait (and
enabling the feature gate where the trait is defined). Longer term,
you should restructure your traits to avoid the problem. Usually this
means changing the order of parameters so that the "central" type
parameter is in the `Self` position.

As an example of that refactoring, consider the `BorrowFrom` trait:

```rust
pub trait BorrowFrom&lt;Sized? Owned&gt; for Sized? {
    fn borrow_from(owned: &amp;Owned) -&gt; &amp;Self;
}
```

As defined, this trait is commonly implemented for custom pointer
types, such as `Arc`. Those impls follow the pattern:

```rust
impl&lt;T&gt; BorrowFrom&lt;Arc&lt;T&gt;&gt; for T {...}
```

Unfortunately, this impl is illegal because the self type `T` is not
local to the current crate. Therefore, we are going to change the order of the parameters,
so that `BorrowFrom` becomes `Borrow`:

```rust
pub trait Borrow&lt;Sized? Borrowed&gt; for Sized? {
    fn borrow_from(owned: &amp;Self) -&gt; &amp;Borrowed;
}
```

Now the `Arc` impl is written:

```rust
impl&lt;T&gt; Borrow&lt;T&gt; for Arc&lt;T&gt; { ... }
```

This impl is legal because the self type (`Arc&lt;T&gt;`) is local.
</content>
</entry>
</feed>
