-
Notifications
You must be signed in to change notification settings - Fork 13.4k
Write Rustdoc titles like "x in crate::mod - Rust" #84380
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 all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
0c193f8
Write Rustdoc titles like "x in crate::mod - Rust"
syvb 7cf4f42
Rename pushname to is_module
syvb a9ff7ac
Merge mod-title and item-title tests
syvb 05121a2
fix is_module check
syvb 3ddafb2
Add test for title of root page in item-title.rs
syvb df147c7
Just merge all of the <title> tests into one
syvb 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
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 was deleted.
Oops, something went wrong.
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 |
---|---|---|
@@ -0,0 +1,44 @@ | ||
#![crate_name = "foo"] | ||
#![feature(doc_keyword)] | ||
|
||
// tests for the html <title> element | ||
|
||
// @has foo/index.html '//head/title' 'foo - Rust' | ||
|
||
// @has foo/fn.widget_count.html '//head/title' 'widget_count in foo - Rust' | ||
/// blah | ||
pub fn widget_count() {} | ||
|
||
// @has foo/struct.Widget.html '//head/title' 'Widget in foo - Rust' | ||
pub struct Widget; | ||
|
||
// @has foo/constant.ANSWER.html '//head/title' 'ANSWER in foo - Rust' | ||
pub const ANSWER: u8 = 42; | ||
|
||
// @has foo/blah/index.html '//head/title' 'foo::blah - Rust' | ||
pub mod blah { | ||
// @has foo/blah/struct.Widget.html '//head/title' 'Widget in foo::blah - Rust' | ||
pub struct Widget; | ||
|
||
// @has foo/blah/trait.Awesome.html '//head/title' 'Awesome in foo::blah - Rust' | ||
pub trait Awesome {} | ||
|
||
// @has foo/blah/fn.make_widget.html '//head/title' 'make_widget in foo::blah - Rust' | ||
pub fn make_widget() {} | ||
|
||
// @has foo/macro.cool_macro.html '//head/title' 'cool_macro in foo - Rust' | ||
#[macro_export] | ||
macro_rules! cool_macro { | ||
($t:tt) => { $t } | ||
} | ||
} | ||
|
||
// @has foo/keyword.continue.html '//head/title' 'continue - Rust' | ||
#[doc(keyword = "continue")] | ||
mod continue_keyword {} | ||
|
||
// @has foo/primitive.u8.html '//head/title' 'u8 - Rust' | ||
// @!has - '//head/title' 'foo' | ||
#[doc(primitive = "u8")] | ||
/// `u8` docs | ||
mod u8 {} |
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.
Uh oh!
There was an error while loading. Please reload this page.