Skip to content

reachability export map does not consider overloaded operators #2378

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

Closed
nikomatsakis opened this issue May 12, 2012 · 5 comments
Closed

reachability export map does not consider overloaded operators #2378

nikomatsakis opened this issue May 12, 2012 · 5 comments
Assignees
Milestone

Comments

@nikomatsakis
Copy link
Contributor

Right now the reachability export map does not consider overloaded operators. So if you define an overloaded operator in crate A, and use it in crate B, then you run into trouble in crate C that uses crate B (you may need generics and a few other things too). The problem is pretty clear: traverse_expr() does not consider expr_binary, expr_unary, and friends.

@nikomatsakis
Copy link
Contributor Author

I think that I was wrong about the cause. I created a test case and a provisional fix and the test still breaks :(

nikomatsakis added a commit that referenced this issue May 14, 2012
nikomatsakis added a commit to nikomatsakis/rust that referenced this issue May 15, 2012
also: add a non-operator-overloaded method for [] to work around rust-lang#2378
@catamorphism
Copy link
Contributor

@nikomatsakis , I see a bunch of commits -- is this fixed yet?

@ghost ghost assigned nikomatsakis May 17, 2012
@nikomatsakis
Copy link
Contributor Author

No.

nikomatsakis added a commit that referenced this issue May 19, 2012
nikomatsakis added a commit that referenced this issue May 19, 2012
also: add a non-operator-overloaded method for [] to work around #2378
@graydon
Copy link
Contributor

graydon commented Aug 31, 2012

Request confirmation on this, still happening?

@nikomatsakis
Copy link
Contributor Author

I am pretty sure that this is fixed now.

bors added a commit to rust-lang-ci/rust that referenced this issue Sep 22, 2022
use PlaceTy visitor and dedup sime retagging code

I benchmarked this and as far as I can see the difference to the old code is totally within noise. And this makes the code a lot simpler and removes duplication so yay. :)
celinval pushed a commit to celinval/rust-dev that referenced this issue Jun 4, 2024
tshepang pushed a commit to tshepang/rust that referenced this issue May 15, 2025
tshepang pushed a commit to tshepang/rust that referenced this issue May 15, 2025
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

No branches or pull requests

3 participants