Skip to content

Commit bb9b3d5

Browse files
committed
---
yaml --- r: 273150 b: refs/heads/beta c: ed8d059 h: refs/heads/master
1 parent bc41291 commit bb9b3d5

21 files changed

+77
-1
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ refs/tags/0.9: 36870b185fc5f5486636d4515f0e22677493f225
2323
refs/tags/0.10: ac33f2b15782272ae348dbd7b14b8257b2148b5a
2424
refs/tags/0.11.0: e1247cb1d0d681be034adb4b558b5a0c0d5720f9
2525
refs/tags/0.12.0: f0c419429ef30723ceaf6b42f9b5a2aeb5d2e2d1
26-
refs/heads/beta: e81691039854e678381042ce93e13bee6971c3d9
26+
refs/heads/beta: ed8d059d8d49491b736ea88edd8f2b57a866c44a
2727
refs/tags/1.0.0-alpha: e42bd6d93a1d3433c486200587f8f9e12590a4d7
2828
refs/heads/tmp: e06d2ad9fcd5027bcaac5b08fc9aa39a49d0ecd3
2929
refs/tags/1.0.0-alpha.2: 4c705f6bc559886632d3871b04f58aab093bfa2f

branches/beta/src/test/auxiliary/go_trait.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11+
#![feature(specialization)]
12+
1113
// Common code used for tests that model the Fn/FnMut/FnOnce hierarchy.
1214

1315
pub trait Go {

branches/beta/src/test/auxiliary/specialization_cross_crate.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11+
#![feature(specialization)]
12+
1113
pub trait Foo {
1214
fn foo(&self) -> &'static str;
1315
}

branches/beta/src/test/compile-fail/specialization-default-projection.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11+
#![feature(specialization)]
12+
1113
// Make sure we can't project defaulted associated types
1214

1315
trait Foo {

branches/beta/src/test/compile-fail/specialization-default-types.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@
1212
// associated type in the impl defining it -- otherwise, what happens
1313
// if it's overridden?
1414

15+
#![feature(specialization)]
16+
1517
trait Example {
1618
type Output;
1719
fn generate(self) -> Self::Output;
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
// Copyright 2015 The Rust Project Developers. See the COPYRIGHT
2+
// file at the top-level directory of this distribution and at
3+
// http://rust-lang.org/COPYRIGHT.
4+
//
5+
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
6+
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
7+
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
8+
// option. This file may not be copied, modified, or distributed
9+
// except according to those terms.
10+
11+
trait Foo {
12+
fn foo(&self);
13+
}
14+
15+
impl<T> Foo for T {
16+
default fn foo(&self) {} //~ ERROR
17+
}
18+
19+
fn main() {}
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
// Copyright 2015 The Rust Project Developers. See the COPYRIGHT
2+
// file at the top-level directory of this distribution and at
3+
// http://rust-lang.org/COPYRIGHT.
4+
//
5+
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
6+
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
7+
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
8+
// option. This file may not be copied, modified, or distributed
9+
// except according to those terms.
10+
11+
trait Foo {
12+
fn foo(&self);
13+
}
14+
15+
impl<T> Foo for T {
16+
fn foo(&self) {}
17+
}
18+
19+
impl Foo for u8 { //~ ERROR
20+
fn foo(&self) {}
21+
}
22+
23+
fn main() {}

branches/beta/src/test/compile-fail/specialization-negative-impl.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
// except according to those terms.
1010

1111
#![feature(optin_builtin_traits)]
12+
#![feature(specialization)]
1213

1314
struct TestType<T>(T);
1415

branches/beta/src/test/compile-fail/specialization-no-default.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11+
#![feature(specialization)]
12+
1113
trait Foo {
1214
fn foo(&self);
1315
fn bar(&self);

branches/beta/src/test/compile-fail/specialization-overlap-negative.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
// except according to those terms.
1010

1111
#![feature(optin_builtin_traits)]
12+
#![feature(specialization)]
1213

1314
trait MyTrait {}
1415

branches/beta/src/test/compile-fail/specialization-overlap.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11+
#![feature(specialization)]
12+
1113
trait Foo {}
1214
impl<T: Clone> Foo for T {}
1315
impl<T> Foo for Vec<T> {} //~ ERROR E0119

branches/beta/src/test/run-pass/specialization-allowed-cross-crate.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@
1010

1111
// aux-build:go_trait.rs
1212

13+
#![feature(specialization)]
14+
1315
extern crate go_trait;
1416

1517
use go_trait::{Go,GoMut};

branches/beta/src/test/run-pass/specialization-assoc-fns.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11+
#![feature(specialization)]
12+
1113
trait Foo {
1214
fn mk() -> Self;
1315
}

branches/beta/src/test/run-pass/specialization-basics.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11+
#![feature(specialization)]
12+
1113
// Tests a variety of basic specialization scenarios and method
1214
// dispatch for them.
1315

branches/beta/src/test/run-pass/specialization-cross-crate.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@
1010

1111
// aux-build:specialization_cross_crate.rs
1212

13+
#![feature(specialization)]
14+
1315
extern crate specialization_cross_crate;
1416

1517
use specialization_cross_crate::*;

branches/beta/src/test/run-pass/specialization-default-methods.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11+
#![feature(specialization)]
12+
1113
// First, test only use of explicit `default` items:
1214

1315
trait Foo {

branches/beta/src/test/run-pass/specialization-on-projection.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11+
#![feature(specialization)]
12+
1113
trait Foo<T> {}
1214

1315
trait Assoc {

branches/beta/src/test/run-pass/specialization-projection.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11+
#![feature(specialization)]
12+
1113
// Make sure we *can* project non-defaulted associated types
1214
// cf compile-fail/specialization-default-projection.rs
1315

branches/beta/src/test/run-pass/specialization-super-traits.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11+
#![feature(specialization)]
12+
1113
// Test that you can specialize via an explicit trait hierarchy
1214

1315
// FIXME: this doesn't work yet...

branches/beta/src/test/run-pass/specialization-translate-projections-with-params.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11+
#![feature(specialization)]
12+
1113
trait Trait<T> {
1214
fn convert(&self) -> T;
1315
}

branches/beta/src/test/run-pass/specialization-translate-projections.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11+
#![feature(specialization)]
12+
1113
use std::convert::Into;
1214

1315
trait Trait {

0 commit comments

Comments
 (0)