forked from rust-lang/rust
-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Rollup merge of rust-lang#82351 - notriddle:docs-meta-description, r=…
…jyn514 Use the first paragraph, instead of cookie-cutter text, for rustdoc descriptions Partially addresses rust-lang#82283.
- Loading branch information
Showing
5 changed files
with
44 additions
and
1 deletion.
There are no files selected for viewing
This file contains 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 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 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 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,24 @@ | ||
#![crate_name = "foo"] | ||
//! # Description test crate | ||
//! | ||
//! This is the contents of the test crate docstring. | ||
//! It should not show up in the description. | ||
// @has 'foo/index.html' '//meta[@name="description"]/@content' \ | ||
// 'Description test crate' | ||
// @!has - '//meta[@name="description"]/@content' 'should not show up' | ||
|
||
// @has 'foo/foo_mod/index.html' '//meta[@name="description"]/@content' \ | ||
// 'First paragraph description.' | ||
// @!has - '//meta[@name="description"]/@content' 'Second paragraph' | ||
/// First paragraph description. | ||
/// | ||
/// Second paragraph should not show up. | ||
pub mod foo_mod { | ||
pub struct __Thing {} | ||
} | ||
|
||
// @has 'foo/fn.foo_fn.html' '//meta[@name="description"]/@content' \ | ||
// 'Only paragraph.' | ||
/// Only paragraph. | ||
pub fn foo_fn() {} |
This file contains 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,14 @@ | ||
#![crate_name = "foo"] | ||
|
||
// @has 'foo/index.html' '//meta[@name="description"]/@content' \ | ||
// 'API documentation for the Rust `foo` crate.' | ||
|
||
// @has 'foo/foo_mod/index.html' '//meta[@name="description"]/@content' \ | ||
// 'API documentation for the Rust `foo_mod` mod in crate `foo`.' | ||
pub mod foo_mod { | ||
pub struct __Thing {} | ||
} | ||
|
||
// @has 'foo/fn.foo_fn.html' '//meta[@name="description"]/@content' \ | ||
// 'API documentation for the Rust `foo_fn` fn in crate `foo`.' | ||
pub fn foo_fn() {} |