Skip to content

Commit

Permalink
Merge pull request #757 from king6cong/use_fix
Browse files Browse the repository at this point in the history
add behavior change of relative paths without `self` in 2018 edition
  • Loading branch information
Centril authored Feb 13, 2020
2 parents e961167 + 6e2a7b5 commit 1be2f2c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/items/use-declarations.md
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ mod foo {
}

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

Expand Down

0 comments on commit 1be2f2c

Please sign in to comment.