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

Unadorned path should resolve same as relative path written w.r.t. self/super #6291

Closed
alexcrichton opened this issue May 7, 2013 · 8 comments
Labels
A-resolve Area: Path resolution

Comments

@alexcrichton
Copy link
Member

The following test should have all imports as valid:

use a;        // bad
use self::a;  // good
use a::b;     // good

mod a {
  pub type b = int;
}
mod b {
  use a;        // bad
  use super::a; // good
  use a::b;     // good
}

Apparently resolve isn't realizing that use a is equivalent to use super::a. A little more discussion can be found in #6226

@pnkfelix
Copy link
Member

pnkfelix commented Jul 2, 2013

Nominating for milestone, "Well defined". (In particular, I cannot tell if this is a true bug or some sort of weird expected behavior without a more explicit definition of the semantics of path resolution.)

@pnkfelix
Copy link
Member

pnkfelix commented Jul 2, 2013

See also #7551 (which I just filed and arguably may be more appropriate for milestone 1 than this bug actually is).

@pnkfelix
Copy link
Member

Visiting for triage, email 2013-08-12. nothing more to add.

@pnkfelix
Copy link
Member

Note also #4293

@catamorphism
Copy link
Contributor

Metabug for resolve surprises: #6143

@nikomatsakis
Copy link
Contributor

This is not the expected behavior afaik

@catamorphism
Copy link
Contributor

De-milestoning this since metabug is on maturity 1

@alexcrichton
Copy link
Member Author

Closing as a dupe of #8215, I'm not entirely sure that all imports should be valid in that program, I will re-post with an updated version in 8215

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-resolve Area: Path resolution
Projects
None yet
Development

No branches or pull requests

4 participants