Skip to content

Commit 6e2a7b5

Browse files
committed
add behavior change of relative paths without self in 2018 edition
1 parent d68e28c commit 6e2a7b5

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)