Index cross-mod type definition and implementation properly in rustdoc#12752
Merged
bors merged 1 commit intorust-lang:masterfrom Mar 8, 2014
Merged
Index cross-mod type definition and implementation properly in rustdoc#12752bors merged 1 commit intorust-lang:masterfrom
bors merged 1 commit intorust-lang:masterfrom
Conversation
Contributor
Author
|
The ugly |
src/librustdoc/html/render.rs
Outdated
Member
There was a problem hiding this comment.
Can you add a comment here about what this is doing? Just something indicating that our stack has no correlation for where the type was defined.
I think this also needs to handle enums.
Contributor
Author
There was a problem hiding this comment.
Why enum? There's no definition implementation split problem for them.
Contributor
Author
There was a problem hiding this comment.
You mean its variants?
Member
There was a problem hiding this comment.
I has the same problem as structs:
mod b {
impl ::a::Test {
fn foo(&self) {}
}
}
mod a {
pub enum Test { Test1 }
}
Contributor
Author
There was a problem hiding this comment.
One can impl an enum? I wasn't aware of that :D
A structure's definition and implementation may be cross-module. If the implementing module is parsed before defining module, the fully qualified name of the structure won't be present for the implementation to use when being indexed. So caches such 'orphan' implementation and indexes it at the end of crate parsing. Closes rust-lang#10284.
Contributor
Author
|
All comments addressed. |
bors
added a commit
that referenced
this pull request
Mar 8, 2014
A structure's definition and implementation may be cross-module. If the implementing module is parsed before defining module, the fully qualified name of the structure won't be present for the implementation to use when being indexed. So caches such 'orphan' implementation and indexes it at the end of crate parsing. Closes #10284.
Jarcho
pushed a commit
to Jarcho/rust
that referenced
this pull request
Aug 24, 2024
…e_for_test, r=blyxyas Disable assigning_clones for tests Close: rust-lang#12752 As mentioned at rust-lang#12752 when a test struct is initialized with some default string, this inverts the order of assignee/assignment and makes a bit harder to read/write code changelog: [`assigning_clones.rs`]: disable assigning_clones for tests
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.
A structure's definition and implementation may be cross-module. If the
implementing module is parsed before defining module, the fully
qualified name of the structure won't be present for the implementation
to use when being indexed. So caches such 'orphan' implementation and
indexes it at the end of crate parsing.
Closes #10284.