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

Pointer tutorial should talk of all things pointer-y #13602

Closed
Manishearth opened this issue Apr 18, 2014 · 1 comment · Fixed by #16828
Closed

Pointer tutorial should talk of all things pointer-y #13602

Manishearth opened this issue Apr 18, 2014 · 1 comment · Fixed by #16828

Comments

@Manishearth
Copy link
Member

Currently, the pointer tutorial doesn't talk of ref, and clone.

It probably should, and possibly expand on the differences between & and ref and * and ~. I'm clearer about these now (I think), but this was extremely confusing when I started.

It's not so good at helping one debug common pointer issues as well.

@steveklabnik
Copy link
Member

Agreed, 100%.

steveklabnik added a commit to steveklabnik/rust that referenced this issue Aug 30, 2014
matthiaskrgr pushed a commit to matthiaskrgr/rust that referenced this issue Nov 16, 2022
…y, r=Veykril

fix: check visibility of each path segment

Upon path resolution, we have not been checking if every def pointed to by each segment of the path is visible from the original module. This leads to incorrect import resolutions, in particular when one uses glob imports and names collide.

There is decent amount of changes in this PR because:
- some of our tests were not correct in terms of visibility
  - I left several basic nameres tests as-is (with expect test updated) since I thought it would be nice to ensure we don't resolve defs that are not visible.
- `fix_visibility` assist relied on `Semantics::resolve_path()`, which uses the name resolution procedure I'm fixing and wouldn't be able to "see through" the items with strict visibility with this patch

The first commit is the gist of the fix itself.

Fixes rust-lang#10991
Fixes rust-lang#11473
Fixes rust-lang#13252
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 a pull request may close this issue.

2 participants