-
Notifications
You must be signed in to change notification settings - Fork 12.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Tracking Issue for ambiguous_glob_imports
lint
#114095
Labels
C-tracking-issue
Category: A tracking issue for an RFC or an unstable feature.
Comments
bvanjoi
added
the
C-tracking-issue
Category: A tracking issue for an RFC or an unstable feature.
label
Jul 26, 2023
The future incompatibility report is not enabled for dependencies (FutureReleaseError vs FutureReleaseErrorReportNow). Is that intentional? |
Yes, it is indeed another matter: #36837 |
kellerkindt
added a commit
to kellerkindt/asn1rs
that referenced
this issue
Jan 16, 2024
gnoliyil
pushed a commit
to gnoliyil/fuchsia
that referenced
this issue
Jan 27, 2024
The uapi module glob use was causing a new rust lint to trigger. The constants in uapi module were going to cause ambiguous name conflicts due to the constants of the same names defined in the auth, errno, and signals modules. The modules as written should not have been able to compile, but do to a bug in the rust compiler, they did. There are more details in rust-lang/rust#114095. Bug: 130265 Test: fx build Change-Id: I8605a51de353fa6c2089be3ee965737dc55b6f2a Reviewed-on: https://fuchsia-review.googlesource.com/c/fuchsia/+/898801 Fuchsia-Auto-Submit: Paul Faria <[email protected]> Reviewed-by: Theodore Dubois <[email protected]> Commit-Queue: Auto-Submit <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This is a tracking issue for the "ambiguous_glob_imports", a lint that follows the breaking change policy.
Problem
The name resolution algorithm in rustc does not update bindings recursively when the
(Module, Key)
already has a binding. This can result in a situation where a glob binding should be marked as ambiguous but it is not, potentially causing code that should fail to compile to pass instead.For example(#112713):
The
C
infoo
function was referred to(Mod(root), Key(C))
, where it should have an ambiguous binding but actually not due to the stop the update process early.Here are additional details regarding the update process:
importer
resolve_glob_import
use sub::*
use mod1::*
(root::sub, C) -> root::sub::mod1::C
without ambiguity;2.
(root, C) -> root::sub::mod1::C
without ambiguity.use mod2::*
(root::sub, C) -> root::sub::mod1::C
with ambiguity;2. It had been stop update the binding of
(root, C)
due to(root, C)
already has a binding.Solve
We have relaxed the condition for update process and now treat the updated ambiguous error as a warning instead of an error. We use the
ambigous_glob_imports
lint for back compatibility.Steps
The text was updated successfully, but these errors were encountered: