

Github Rustdoc: Fix macros 2.0 and built-in derives being shown at the wrong pat...
source link: https://github.com/rust-lang/rust/pull/77862
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

Member
jyn514 left a comment
This is awful, but I don't know a better way to do it.
Outdated
for path_segment in macro_parent_module.data {
let path_segment = path_segment.to_string();
cur_mod = cur_mod.mods.iter_mut().find(|module| {
matches!(
module.name, Some(symbol)
if symbol.with(|mod_name| mod_name == path_segment)
)
})?;
}
Comment on lines
105 to 109
jyn514 on Oct 13, 2020
Member
Ugh, I really wish rustdoc didn't use its own data structures (#76382). That said, if this works I won't block on it, but it's unambiguously a hack.
@GuillaumeGomez before I sign off on this, do you know a better way to do this?
danielhenrymantilla on Oct 13, 2020
Author
Contributor
That said, if this works I won't block on it, but it's unambiguously a hack.
Definitely! The reason I've submitted this code (despite my not having cleaned that try
block elsewhere) was for you people to tell me if there was some obvious tool I had missed in places like here, given my lack of experience with rustdoc
and rustc
internals
Recommend
-
40
Imagine someone trying to convince you that English is too slow: “A French journalist can write an article in less than a day...
-
9
2012/05/04 Rebar Releases and Being Wrong This is an entry I wrote during the Bay Area Erlang Factory 2012, not long before R15B01 came out. Back at then, I found the time to discuss a few things with fello...
-
12
Requirement The customer required that when an item is in a a specific workflow state, the item cannot be edited. Sitecore has a special security permission to achieve this Workflow State Write
-
8
Copy link Contributor notriddle commented
-
8
I was trying to find a job and found that I stopped being a “real human” without earning money. What’s wrong and what to do next?One quick and painful confession: I’m unemployed.I was not guideless since my sweet 16 when I...
-
17
GraphQL Is Built for Federation, But Don’t Do It Wrong – The New Stack StepZen sponsored this post.
-
4
Conversation Fixes #93912. cc
-
11
from the book “Hell Yeah or No”: I love being wrong 2014-09-09 Most of the time, I feel smart, successful, and driven — like I’ve got it all figured out. But last month a bu...
-
6
Why the smartest people embrace being wrongA mental model used by Jeff Bezos, Adam Grant, Ben Franklin, Ralph Waldo Emerson, and other great thinkers.What happens when our beliefs are challenged?
-
10
The Joys of Being Wrong About YourselfLearning that self-discovery is a process, not a punishment
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK