about summary refs log tree commit diff
diff options
context:
space:
mode:
authorEduard Burtescu <edy.burt@gmail.com>2015-02-20 11:36:31 +0200
committerEduard Burtescu <edy.burt@gmail.com>2015-02-24 14:16:02 +0200
commit9ac073604c6689a773eb19bcc375234384326682 (patch)
treee25208794f4ab3f5256180b410e4b223443fe49a
parent866a5ee2999ae7cb96de58a77647509d090456ee (diff)
downloadrust-9ac073604c6689a773eb19bcc375234384326682.tar.gz
rust-9ac073604c6689a773eb19bcc375234384326682.zip
Fix fallout from allowing impls outside of the type's definition module.
-rw-r--r--src/librustc_typeck/coherence/orphan.rs1
-rw-r--r--src/test/run-pass/issue-12729.rs (renamed from src/test/compile-fail/issue-12729.rs)4
-rw-r--r--src/test/run-pass/issue-7607-2.rs (renamed from src/test/compile-fail/issue-7607-2.rs)4
-rw-r--r--src/test/run-pass/trait-impl-2.rs4
4 files changed, 4 insertions, 9 deletions
diff --git a/src/librustc_typeck/coherence/orphan.rs b/src/librustc_typeck/coherence/orphan.rs
index 34fadc70af8..465b3c8e3ac 100644
--- a/src/librustc_typeck/coherence/orphan.rs
+++ b/src/librustc_typeck/coherence/orphan.rs
@@ -15,7 +15,6 @@ use middle::traits;
 use middle::ty;
 use syntax::ast::{Item, ItemImpl};
 use syntax::ast;
-use syntax::ast_map;
 use syntax::ast_util;
 use syntax::visit;
 use util::ppaux::{Repr, UserString};
diff --git a/src/test/compile-fail/issue-12729.rs b/src/test/run-pass/issue-12729.rs
index ae033bbf38d..09c0c8604ad 100644
--- a/src/test/compile-fail/issue-12729.rs
+++ b/src/test/run-pass/issue-12729.rs
@@ -8,14 +8,12 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-// ignore-tidy-linelength
-
 pub struct Foo;
 
 mod bar {
     use Foo;
 
-    impl Foo { //~ERROR inherent implementations are only allowed on types defined in the current module
+    impl Foo {
         fn baz(&self) {}
     }
 }
diff --git a/src/test/compile-fail/issue-7607-2.rs b/src/test/run-pass/issue-7607-2.rs
index 9541899b469..c52051fab96 100644
--- a/src/test/compile-fail/issue-7607-2.rs
+++ b/src/test/run-pass/issue-7607-2.rs
@@ -8,15 +8,13 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-// ignore-tidy-linelength
-
 pub mod a {
     pub struct Foo { a: usize }
 }
 
 pub mod b {
     use a::Foo;
-    impl Foo { //~ERROR inherent implementations are only allowed on types defined in the current module
+    impl Foo {
         fn bar(&self) { }
     }
 }
diff --git a/src/test/run-pass/trait-impl-2.rs b/src/test/run-pass/trait-impl-2.rs
index 727c33d6ce5..abc35bcc29d 100644
--- a/src/test/run-pass/trait-impl-2.rs
+++ b/src/test/run-pass/trait-impl-2.rs
@@ -8,8 +8,8 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-mod Foo {
-    trait Trait {
+pub mod Foo {
+    pub trait Trait {
         fn foo(&self);
     }
 }