Skip to content

Conversation

@valff
Copy link
Contributor

@valff valff commented Aug 25, 2019

Fixes #3750

As per rust-lang/rust#60941 (comment), rustc works as intended. This PR solves the issue by avoiding self in path segments of depth past 2.

use self::foo; // it's fine
use foo::{self, bar}; // `foo` can't be a function/macro
// Intentional duplication of `vec` segment, because `vec` can be a function/macro
use alloc::{vec, vec::Vec};

@valff
Copy link
Contributor Author

valff commented Aug 25, 2019

@topecongiro topecongiro merged commit ef00f74 into rust-lang:master Aug 27, 2019
@topecongiro
Copy link
Contributor

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Formatting changes semantics of imports

2 participants