Skip to content

Commit f003b43

Browse files
committed
Change tests to use self instead of mod in use items
1 parent 74d11d2 commit f003b43

File tree

5 files changed

+14
-14
lines changed

5 files changed

+14
-14
lines changed

src/test/compile-fail/use-mod-2.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,10 @@
99
// except according to those terms.
1010

1111
mod foo {
12-
use self::{mod};
12+
use self::{self};
1313
//~^ ERROR unresolved import `self`. There is no `self` in `???`
1414

15-
use super::{mod};
15+
use super::{self};
1616
//~^ ERROR unresolved import `super`. There is no `super` in `???`
1717
}
1818

src/test/compile-fail/use-mod-3.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
// except according to those terms.
1010

1111
use foo::bar::{
12-
mod //~ ERROR module `bar` is private
12+
self //~ ERROR module `bar` is private
1313
};
1414
use foo::bar::{
1515
Bar //~ ERROR type `Bar` is inaccessible

src/test/compile-fail/use-mod.rs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -9,18 +9,18 @@
99
// except according to those terms.
1010

1111
use foo::bar::{
12-
mod,
13-
//~^ ERROR `mod` import can only appear once in the list
12+
self,
13+
//~^ ERROR `self` import can only appear once in the list
1414
Bar,
15-
mod
16-
//~^ NOTE another `mod` import appears here
15+
self
16+
//~^ NOTE another `self` import appears here
1717
};
1818

19-
use {mod};
20-
//~^ ERROR `mod` import can only appear in an import list with a non-empty prefix
19+
use {self};
20+
//~^ ERROR `self` import can only appear in an import list with a non-empty prefix
2121

22-
use foo::mod;
23-
//~^ ERROR `mod` imports are only allowed within a { } list
22+
use foo::self;
23+
//~^ ERROR `self` imports are only allowed within a { } list
2424

2525
mod foo {
2626
pub mod bar {

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ extern crate collections;
1313
extern crate serialize;
1414

1515
use std::collections::HashMap;
16-
use serialize::json::{mod, Json};
16+
use serialize::json::{self, Json};
1717
use std::option;
1818

1919
enum object {

src/test/run-pass/use-mod.rs

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

11-
pub use foo::bar::{mod, First};
11+
pub use foo::bar::{self, First};
1212
use self::bar::Second;
1313

1414
mod foo {
15-
pub use self::bar::baz::{mod};
15+
pub use self::bar::baz::{self};
1616

1717
pub mod bar {
1818
pub mod baz {

0 commit comments

Comments
 (0)