-
Notifications
You must be signed in to change notification settings - Fork 14.1k
Generate documentation for auto-trait impls #47833
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
Changes from 1 commit
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
6728f21
Generate documentation for auto-trait impls
Aaron1011 9d7165f
Fix merge conflicts
Aaron1011 1531fbe
Cleanup formatting
Aaron1011 0bfbe24
More formatting fixes
Aaron1011 94fd4f3
More formatting fixups
Aaron1011 64a1f6f
Fix inlining
Aaron1011 298d703
Remove extra whitespace
Aaron1011 0c6ad46
Don't generate auto trait impls for type aliases
Aaron1011 2aead59
Remove extra space in test
Aaron1011 8788179
Fix submodule ref
Aaron1011 44d07df
Sort synthetic impls bounds before rendering
Aaron1011 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Cleanup formatting
- Loading branch information
commit 1531fbe9becc9b5d84a9360fb75440efc41b7db7
There are no files selected for viewing
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
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
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
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -169,7 +169,6 @@ pub enum ExternalLocation { | |
| Unknown, | ||
| } | ||
|
|
||
|
|
||
| /// Metadata about implementations for a type or trait. | ||
| #[derive(Clone)] | ||
| pub struct Impl { | ||
|
|
@@ -523,7 +522,6 @@ pub fn run(mut krate: clean::Crate, | |
| themes, | ||
| }; | ||
|
|
||
|
|
||
| // If user passed in `--playground-url` arg, we fill in crate name here | ||
| if let Some(url) = playground_url { | ||
| markdown::PLAYGROUND.with(|slot| { | ||
|
|
@@ -2512,22 +2510,6 @@ fn item_trait(w: &mut fmt::Formatter, cx: &Context, it: &clean::Item, | |
| } | ||
| write!(w, "</ul>")?; | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. But what do you close in here?
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This time, |
||
| } | ||
|
|
||
| write!(w, r#"<script type="text/javascript"> | ||
| window.inlined_types=new Set();"#)?; | ||
|
|
||
| write!(w, r#"<script type="text/javascript" async | ||
| src="{root_path}/implementors/{path}/{ty}.{name}.js"> | ||
| </script>"#, | ||
| root_path = vec![".."; cx.current.len()].join("/"), | ||
| path = if it.def_id.is_local() { | ||
| cx.current.join("/") | ||
| } else { | ||
| let (ref path, _) = cache.external_paths[&it.def_id]; | ||
| path[..path.len() - 1].join("/") | ||
| }, | ||
| ty = it.type_().css_class(), | ||
| name = *it.name.as_ref().unwrap())?; | ||
| } else { | ||
| // even without any implementations to write in, we still want the heading and list, so the | ||
| // implementors javascript file pulled in below has somewhere to write the impls into | ||
|
|
||
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
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please remove the comma at the end of the line.