Closed
Description
Hi,
In the chapter about use declarations in The Reference book (https://doc.rust-lang.org/reference/items/use-declarations.html#use-paths), the book states that:
Paths in use items must start with a crate name or one of the path qualifiers crate, self, super, or ::.
It then gives a code snippet with examples of what is allowed and what is not. In particular the line:
// use example::iter; // bad: relative paths are not allowed without `self`
is commented out because it shouldn't compile but when I tried to compile the snippet on the playground with the line uncommented, the compilation was successful (using 2018 edition).
Am I wrong or the book contains an error?
Metadata
Metadata
Assignees
Labels
No labels