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
resolve: clean up the semantics of `self` in an import list
Change `self` in an import list `use foo::bar::{self, ...};` to import `bar` only in the type namespace. Today, `bar` is imported in every namespace in which `foo::bar` is defined.
This is a [breaking-change], see #38293 (comment) for examples of code that would break.
Fixes#38293.
r? @nrc
Consider the following piece of code, which compiles:
The
use
declaration is allowed to usefoo
as a module whenfoo
is actually a function. This should not be allowed.Further, when
foo
does exist as a module, regardless of visibility,self
incorrectly imports items with the same name in that module:The text was updated successfully, but these errors were encountered: