Skip to content

Commit 3fa5203

Browse files
committed
Take default methods out from behind the flag.
1 parent 1944641 commit 3fa5203

23 files changed

+2
-23
lines changed

src/librustc/middle/lint.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -236,7 +236,7 @@ static lint_table: &'static [(&'static str, LintSpec)] = &[
236236
LintSpec {
237237
lint: default_methods,
238238
desc: "allow default methods",
239-
default: deny
239+
default: allow
240240
}),
241241

242242
("unused_unsafe",

src/libstd/iterator.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ implementing the `Iterator` trait.
1717
1818
*/
1919

20-
#[allow(default_methods)]; // solid enough for the use case here
20+
#[allow(default_methods)]; // still off by default in stage0
2121

2222
use cmp;
2323
use iter::Times;

src/test/auxiliary/issue_3979_traits.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ trait Positioned {
1818
fn X(&self) -> int;
1919
}
2020

21-
#[allow(default_methods)]
2221
trait Movable: Positioned {
2322
fn translate(&self, dx: int) {
2423
self.SetX(self.X() + dx);

src/test/auxiliary/trait_default_method_xc_aux.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
#[allow(default_methods)];
21

32
pub struct Something { x: int }
43

src/test/run-pass/bug-7183-generics.rs

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

11-
#[allow(default_methods)]
1211
trait Speak {
1312
fn say(&self, s:&str) -> ~str;
1413
fn hi(&self) -> ~str { hello(self) }

src/test/run-pass/bug-7295.rs

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

11-
#[allow(default_methods)];
1211
pub trait Foo<T> {
1312
pub fn func1<U>(&self, t: U);
1413

src/test/run-pass/default-method-simple.rs

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

11-
#[allow(default_methods)];
1211

1312
trait Foo {
1413
fn f(&self) {

src/test/run-pass/issue-3563-2.rs

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

11-
#[allow(default_methods)]
1211
trait Canvas {
1312
fn add_point(&self, point: &int);
1413
fn add_points(&self, shapes: &[int]) {

src/test/run-pass/issue-3563-3.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,6 @@ impl ToStr for AsciiArt {
113113

114114
// This is similar to an interface in other languages: it defines a protocol which
115115
// developers can implement for arbitrary concrete types.
116-
#[allow(default_methods)]
117116
trait Canvas {
118117
fn add_point(&mut self, shape: Point);
119118
fn add_rect(&mut self, shape: Rect);

src/test/run-pass/issue-3683.rs

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

11-
#[allow(default_methods)];
1211

1312
trait Foo {
1413
fn a(&self) -> int;

src/test/run-pass/issue-3979-generics.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ trait Positioned<S> {
1414
fn X(&self) -> S;
1515
}
1616

17-
#[allow(default_methods)]
1817
trait Movable<S, T>: Positioned<T> {
1918
fn translate(&self, dx: T) {
2019
self.SetX(self.X() + dx);

src/test/run-pass/issue-3979.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ trait Positioned {
1616
fn X(&self) -> int;
1717
}
1818

19-
#[allow(default_methods)]
2019
trait Movable: Positioned {
2120
fn translate(&mut self, dx: int) {
2221
let x = self.X();

src/test/run-pass/trait-default-method-bound-subst.rs

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

11-
#[allow(default_methods)];
1211

1312
trait A<T> {
1413
fn g<U>(&self, x: T, y: U) -> (T, U) { (x, y) }

src/test/run-pass/trait-default-method-bound-subst2.rs

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

11-
#[allow(default_methods)];
1211

1312
trait A<T> {
1413
fn g(&self, x: T) -> T { x }

src/test/run-pass/trait-default-method-bound-subst3.rs

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

11-
#[allow(default_methods)];
1211

1312
trait A {
1413
fn g<T>(&self, x: T, y: T) -> (T, T) { (x, y) }

src/test/run-pass/trait-default-method-bound-subst4.rs

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

11-
#[allow(default_methods)];
1211

1312
trait A<T> {
1413
fn g(&self, x: uint) -> uint { x }

src/test/run-pass/trait-default-method-bound.rs

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

11-
#[allow(default_methods)];
1211

1312
trait A {
1413
fn g(&self) -> int { 10 }

src/test/run-pass/trait-default-method-xc.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
// xfail-fast
22
// aux-build:trait_default_method_xc_aux.rs
33

4-
#[allow(default_methods)];
54

65
extern mod aux(name = "trait_default_method_xc_aux");
76
use aux::{A, TestEquality, Something};

src/test/run-pass/trait-with-bounds-default.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ pub trait Clone2 {
1515
fn clone(&self) -> Self;
1616
}
1717

18-
#[allow(default_methods)]
1918
trait Getter<T: Clone> {
2019
fn do_get(&self) -> T;
2120

src/test/run-pass/traits-default-method-macro.rs

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

11-
#[allow(default_methods)];
1211

1312
trait Foo {
1413
fn bar(&self) -> ~str {

src/test/run-pass/traits-default-method-mut.rs

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

11-
#[allow(default_methods)];
1211

1312
trait Foo {
1413
fn foo(&self, mut v: int) { v = 1; }

src/test/run-pass/traits-default-method-self.rs

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

11-
#[allow(default_methods)];
1211

1312
trait Cat {
1413
fn meow(&self) -> bool;

src/test/run-pass/traits-default-method-trivial.rs

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

11-
#[allow(default_methods)];
1211

1312
trait Cat {
1413
fn meow(&self) -> bool;

0 commit comments

Comments
 (0)