diff options
| author | Nick Cameron <ncameron@mozilla.com> | 2014-12-31 17:29:22 +1300 |
|---|---|---|
| committer | Nick Cameron <ncameron@mozilla.com> | 2015-01-02 23:05:22 +1300 |
| commit | f003b43823146d04f2efc9b0357f6dbae6ce9d0e (patch) | |
| tree | 9d32f29a34a3bb4b8a7c63450a0f641188bd2391 | |
| parent | 74d11d26f4042ce04c56edfd6caafa003383147d (diff) | |
| download | rust-f003b43823146d04f2efc9b0357f6dbae6ce9d0e.tar.gz rust-f003b43823146d04f2efc9b0357f6dbae6ce9d0e.zip | |
Change tests to use `self` instead of `mod` in use items
| -rw-r--r-- | src/test/compile-fail/use-mod-2.rs | 4 | ||||
| -rw-r--r-- | src/test/compile-fail/use-mod-3.rs | 2 | ||||
| -rw-r--r-- | src/test/compile-fail/use-mod.rs | 16 | ||||
| -rw-r--r-- | src/test/run-pass/issue-2804.rs | 2 | ||||
| -rw-r--r-- | src/test/run-pass/use-mod.rs | 4 |
5 files changed, 14 insertions, 14 deletions
diff --git a/src/test/compile-fail/use-mod-2.rs b/src/test/compile-fail/use-mod-2.rs index 12d4531078d..e98224bee02 100644 --- a/src/test/compile-fail/use-mod-2.rs +++ b/src/test/compile-fail/use-mod-2.rs @@ -9,10 +9,10 @@ // except according to those terms. mod foo { - use self::{mod}; + use self::{self}; //~^ ERROR unresolved import `self`. There is no `self` in `???` - use super::{mod}; + use super::{self}; //~^ ERROR unresolved import `super`. There is no `super` in `???` } diff --git a/src/test/compile-fail/use-mod-3.rs b/src/test/compile-fail/use-mod-3.rs index b6b86a9993d..040674fd6d9 100644 --- a/src/test/compile-fail/use-mod-3.rs +++ b/src/test/compile-fail/use-mod-3.rs @@ -9,7 +9,7 @@ // except according to those terms. use foo::bar::{ - mod //~ ERROR module `bar` is private + self //~ ERROR module `bar` is private }; use foo::bar::{ Bar //~ ERROR type `Bar` is inaccessible diff --git a/src/test/compile-fail/use-mod.rs b/src/test/compile-fail/use-mod.rs index b2b0eb21ace..493991835e8 100644 --- a/src/test/compile-fail/use-mod.rs +++ b/src/test/compile-fail/use-mod.rs @@ -9,18 +9,18 @@ // except according to those terms. use foo::bar::{ - mod, -//~^ ERROR `mod` import can only appear once in the list + self, +//~^ ERROR `self` import can only appear once in the list Bar, - mod -//~^ NOTE another `mod` import appears here + self +//~^ NOTE another `self` import appears here }; -use {mod}; -//~^ ERROR `mod` import can only appear in an import list with a non-empty prefix +use {self}; +//~^ ERROR `self` import can only appear in an import list with a non-empty prefix -use foo::mod; -//~^ ERROR `mod` imports are only allowed within a { } list +use foo::self; +//~^ ERROR `self` imports are only allowed within a { } list mod foo { pub mod bar { diff --git a/src/test/run-pass/issue-2804.rs b/src/test/run-pass/issue-2804.rs index 6f1f2cea8ec..ab2d1d90093 100644 --- a/src/test/run-pass/issue-2804.rs +++ b/src/test/run-pass/issue-2804.rs @@ -13,7 +13,7 @@ extern crate collections; extern crate serialize; use std::collections::HashMap; -use serialize::json::{mod, Json}; +use serialize::json::{self, Json}; use std::option; enum object { diff --git a/src/test/run-pass/use-mod.rs b/src/test/run-pass/use-mod.rs index 34c9f581f07..3f3cb634d74 100644 --- a/src/test/run-pass/use-mod.rs +++ b/src/test/run-pass/use-mod.rs @@ -8,11 +8,11 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -pub use foo::bar::{mod, First}; +pub use foo::bar::{self, First}; use self::bar::Second; mod foo { - pub use self::bar::baz::{mod}; + pub use self::bar::baz::{self}; pub mod bar { pub mod baz { |
