Repository navigation
Include static methods on traits in reexports. - #6384
Merged
Merged
Conversation
Contributor
|
I'll approve once the test case is added. |
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.
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
U007D
pushed a commit
to U007D/rust-mos
that referenced
this pull request
Aug 21, 2026
6384: add doctest runnables on struct r=lnicola a=bnjjj I will check for how to do the same on trait implementation on another PR. rust-lang#6356 Co-authored-by: Benjamin Coenen <5719034+bnjjj@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.