Skip to content

Commit 1be2f2c

Browse files
authored
Merge pull request #757 from king6cong/use_fix
add behavior change of relative paths without `self` in 2018 edition
2 parents e961167 + 6e2a7b5 commit 1be2f2c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/items/use-declarations.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ mod foo {
103103
}
104104

105105
use crate::foo::example::iter; // good: foo is at crate root
106-
// use example::iter; // bad: relative paths are not allowed without `self`
106+
// use example::iter; // bad in 2015 edition: relative paths are not allowed without `self`; good in 2018 edition
107107
use self::baz::foobaz; // good: self refers to module 'foo'
108108
use crate::foo::bar::foobar; // good: foo is at crate root
109109

0 commit comments

Comments
 (0)