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

Make anonymous traits only implementable in the same module that declared the type #3785

Closed
pcwalton opened this issue Oct 16, 2012 · 6 comments
Labels
A-resolve Area: Name/path resolution done by `rustc_resolve` specifically

Comments

@pcwalton
Copy link
Contributor

What it says. Resolve is hard otherwise.

@brson
Copy link
Contributor

brson commented Oct 22, 2012

Fine by me.

@catamorphism
Copy link
Contributor

@pcwalton Is this still relevant? (do we even have anonymous traits?)

@catamorphism
Copy link
Contributor

Closing -- I don't think we have anonymous traits.

@thestinger
Copy link
Contributor

Maybe it means anonymous implementations?

@catamorphism
Copy link
Contributor

@thestinger Maybe so; in that case, anon impls already have to be in the same crate that declared the type. Not sure whether tighting the restriction to "same module" improves anything?

@apoelstra
Copy link
Contributor

#15060 is an example of a problem caused by the current behaviour.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-resolve Area: Name/path resolution done by `rustc_resolve` specifically
Projects
None yet
Development

No branches or pull requests

5 participants