Skip to content

Include static methods on traits in reexports. #6384

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

Merged
merged 2 commits into from
May 11, 2013

Conversation

thomaslee
Copy link
Contributor

This fixes the issue described in #4202.

From what I understood of the code, when we reexport a trait in a submodule using e.g. "pub use foo::SomeTrait", we were not previously making an effort to reexport the static methods on that trait.

I'm new to the Rust code base (and the Rust language itself) so my approach may not be kosher, but this patch works by changing the encoder to include the static methods associated with traits.

I couldn't see any tests for this area of the code, so I didn't really have any examples to go by. If tests are needed, I'm happy to work through that if I can get some assistance to do so.

@catamorphism
Copy link
Contributor

I'll approve once the test case is added.

@thomaslee
Copy link
Contributor Author

Here's the test case @catamorphism -- thanks!

bors added a commit that referenced this pull request May 11, 2013
This fixes the issue described in #4202.

From what I understood of the code, when we reexport a trait in a submodule using e.g. "pub use foo::SomeTrait", we were not previously making an effort to reexport the static methods on that trait.

I'm new to the Rust code base (and the Rust language itself) so my approach may not be kosher, but this patch works by changing the encoder to include the static methods associated with traits.

I couldn't see any tests for this area of the code, so I didn't really have any examples to go by. If tests are needed, I'm happy to work through that if I can get some assistance to do so.
@bors bors closed this May 11, 2013
@bors bors merged commit 1e241ce into rust-lang:incoming May 11, 2013
flip1995 pushed a commit to flip1995/rust that referenced this pull request Dec 6, 2020
Fix a false positive in `unnecessary_wraps`

Fix rust-lang#6384

changelog: Fix FP in `unnecessary_wraps` that happens when `Call` expr has `Return` expr inside
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 this pull request may close these issues.

3 participants