You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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?
The text was updated successfully, but these errors were encountered:
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:
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?
The text was updated successfully, but these errors were encountered: