Skip to content
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

legacy_imports future-compatibility warnings #38260

Closed
2 of 3 tasks
jseyfried opened this issue Dec 9, 2016 · 0 comments · Fixed by #50760
Closed
2 of 3 tasks

legacy_imports future-compatibility warnings #38260

jseyfried opened this issue Dec 9, 2016 · 0 comments · Fixed by #50760
Labels
C-future-incompatibility Category: Future-incompatibility lints

Comments

@jseyfried
Copy link
Contributor

jseyfried commented Dec 9, 2016

This is the summary issue for the legacy_imports future-compatibility warning and other related errors. The goal of this page is describe why this change was made and how you can fix code that is affected by it. It also provides a place to ask questions or register a complaint if you feel the change should not be made.

What is the warning for?

The legacy_imports warning is issued when

  • a glob import of an ancestor module (e.g. use super::*) imports a non-pub name,
  • the name is also imported by another glob import, making it ambiguous, and
  • the name is used, triggering an ambiguity error.

See RFC 1560 for more detailed information.

When will this warning become a hard error?

At the beginning of each 6-week release cycle, the Rust compiler team will review the set of outstanding future compatibility warnings and nominate some of them for Final Comment Period. Toward the end of the cycle, we will review any comments and make a final determination whether to convert the warning into a hard error or remove it entirely.

Current status

@Mark-Simulacrum Mark-Simulacrum added the C-future-incompatibility Category: Future-incompatibility lints label Jun 23, 2017
@Mark-Simulacrum Mark-Simulacrum removed the C-tracking-issue Category: An issue tracking the progress of sth. like the implementation of an RFC label Jul 22, 2017
bors added a commit that referenced this issue May 19, 2018
Turn deprecation lint `legacy_imports` into a hard error

Closes #38260

The lint was introduced in Dec 2016, then made deny-by-default in Jun 2017 when crater run found 0 regressions caused by it.

This lint requires some not entirely trivial amount of import resolution logic that (surprisingly or not) interacts with `feature(use_extern_macros)` (#35896), so it would be desirable to remove it before stabilizing `use_extern_macros`.
In particular, this PR fixes the failing example in #50725 (but not the whole issue, `use std::panic::{self}` still can cause other undesirable errors when `use_extern_macros` is enabled).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-future-incompatibility Category: Future-incompatibility lints
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants