Skip to content

Commit

Permalink
Tibet does not have a space program. Peru does.
Browse files Browse the repository at this point in the history
  • Loading branch information
Manishearth committed Apr 11, 2016
1 parent 4805e12 commit 69095bb
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions src/librustc_typeck/diagnostics.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3651,23 +3651,23 @@ specialized further. Erroneous code example:
```compile_fail
#![feature(specialization)]
trait SpaceLama {
trait SpaceLlama {
fn fly(&self);
}
// applies to all T
impl<T> SpaceLama for T {
impl<T> SpaceLlama for T {
default fn fly(&self) {}
}
// non-default impl
// applies to all `Clone` T and overrides the previous impl
impl<T: Clone> SpaceLama for T {
impl<T: Clone> SpaceLlama for T {
fn fly(&self) {}
}
// since `i32` is clone, this conflicts with the previous implementation
impl SpaceLama for i32 {
impl SpaceLlama for i32 {
default fn fly(&self) {}
// error: item `fly` is provided by an `impl` that specializes
// another, but the item in the parent `impl` is not marked
Expand All @@ -3684,23 +3684,23 @@ Example:
```
#![feature(specialization)]
trait SpaceLama {
trait SpaceLlama {
fn fly(&self);
}
// applies to all T
impl<T> SpaceLama for T {
impl<T> SpaceLlama for T {
default fn fly(&self) {} // This is a parent implementation.
}
// applies to all `Clone` T; overrides the previous impl
impl<T: Clone> SpaceLama for T {
impl<T: Clone> SpaceLlama for T {
default fn fly(&self) {} // This is a parent implementation but was
// previously not a default one, causing the error
}
// applies to i32, overrides the previous two impls
impl SpaceLama for i32 {
impl SpaceLlama for i32 {
fn fly(&self) {} // And now that's ok!
}
```
Expand Down

1 comment on commit 69095bb

@rigdent
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But why?

Tibetans focus more on inner space than outer space, so we do have a space program: Buddhism. ^_-

Please sign in to comment.