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;

0 commit comments

Comments
 (0)