Skip to content

Commit 69840e6

Browse files
committed
---
yaml --- r: 143253 b: refs/heads/try2 c: 4517e39 h: refs/heads/master i: 143251: 361896f v: v3
1 parent 0df2fd0 commit 69840e6

File tree

6 files changed

+2
-40
lines changed

6 files changed

+2
-40
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ refs/heads/snap-stage3: 78a7676898d9f80ab540c6df5d4c9ce35bb50463
55
refs/heads/try: 519addf6277dbafccbb4159db4b710c37eaa2ec5
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
8-
refs/heads/try2: ce1db94647fc82e0625a74fbf9670a7517aba996
8+
refs/heads/try2: 4517e3912581a0709d5862101e19896e57afc22c
99
refs/heads/dist-snap: ba4081a5a8573875fed17545846f6f6902c8ba8d
1010
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
1111
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503

branches/try2/src/librustc/middle/lint.rs

Lines changed: 0 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,6 @@ pub enum lint {
7979
non_camel_case_types,
8080
non_uppercase_statics,
8181
type_limits,
82-
default_methods,
8382
unused_unsafe,
8483

8584
managed_heap_memory,
@@ -222,13 +221,6 @@ static lint_table: &'static [(&'static str, LintSpec)] = &[
222221
default: warn
223222
}),
224223

225-
("default_methods",
226-
LintSpec {
227-
lint: default_methods,
228-
desc: "allow default methods",
229-
default: allow
230-
}),
231-
232224
("unused_unsafe",
233225
LintSpec {
234226
lint: unused_unsafe,
@@ -690,23 +682,6 @@ fn lint_type_limits() -> visit::vt<@mut Context> {
690682
})
691683
}
692684

693-
fn check_item_default_methods(cx: &Context, item: &ast::item) {
694-
match item.node {
695-
ast::item_trait(_, _, ref methods) => {
696-
for methods.iter().advance |method| {
697-
match *method {
698-
ast::required(*) => {}
699-
ast::provided(*) => {
700-
cx.span_lint(default_methods, item.span,
701-
"default methods are experimental");
702-
}
703-
}
704-
}
705-
}
706-
_ => {}
707-
}
708-
}
709-
710685
fn check_item_ctypes(cx: &Context, it: &ast::item) {
711686
fn check_ty(cx: &Context, ty: &ast::Ty) {
712687
match ty.node {
@@ -1143,7 +1118,6 @@ pub fn check_crate(tcx: ty::ctxt, crate: @ast::Crate) {
11431118
check_item_ctypes(cx, it);
11441119
check_item_non_camel_case_types(cx, it);
11451120
check_item_non_uppercase_statics(cx, it);
1146-
check_item_default_methods(cx, it);
11471121
check_item_heap(cx, it);
11481122

11491123
cx.process(Item(it));

branches/try2/src/libstd/cmp.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ and `Eq` to overload the `==` and `!=` operators.
2121
*/
2222

2323
#[allow(missing_doc)];
24-
#[allow(default_methods)]; // NOTE: Remove when allowed in stage0
2524

2625
/**
2726
* Trait for values that can be compared for equality and inequality.

branches/try2/src/libstd/iterator.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,6 @@ implementing the `Iterator` trait.
1717
1818
*/
1919

20-
#[allow(default_methods)]; // still off by default in stage0
21-
2220
use cmp;
2321
use iter::Times;
2422
use num::{Zero, One};

branches/try2/src/test/compile-fail/lint-default-methods.rs

Lines changed: 0 additions & 7 deletions
This file was deleted.

branches/try2/src/test/run-pass/issue-7712.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,6 @@
1010

1111
// compile-flags:-Z debug-info
1212

13-
#[allow(default_methods)];
14-
1513
pub trait TraitWithDefaultMethod {
1614
pub fn method(self) {
1715
()
@@ -24,4 +22,4 @@ impl TraitWithDefaultMethod for MyStruct { }
2422

2523
fn main() {
2624
MyStruct.method();
27-
}
25+
}

0 commit comments

Comments
 (0)