-
Notifications
You must be signed in to change notification settings - Fork 12.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Auto merge of #92609 - matthiaskrgr:rollup-ldp47ot, r=matthiaskrgr
Rollup of 7 pull requests Successful merges: - #92058 (Make Run button visible on hover) - #92288 (Fix a pair of mistyped test cases in `std::net::ip`) - #92349 (Fix rustdoc::private_doc_tests lint for public re-exported items) - #92360 (Some cleanups around check_argument_types) - #92389 (Regression test for borrowck ICE #92015) - #92404 (Fix font size for [src] links in headers) - #92443 (Rustdoc: resolve associated traits for non-generic primitive types) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
- Loading branch information
Showing
21 changed files
with
353 additions
and
155 deletions.
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
Large diffs are not rendered by default.
Oops, something went wrong.
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
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,7 @@ | ||
// Example code blocks sometimes have a "Run" button to run them on the | ||
// Playground. That button is hidden until the user hovers over the code block. | ||
// This test checks that it is hidden, and that it shows on hover. | ||
goto: file://|DOC_PATH|/test_docs/fn.foo.html | ||
assert-css: (".test-arrow", {"visibility": "hidden"}) | ||
move-cursor-to: ".example-wrap" | ||
assert-css: (".test-arrow", {"visibility": "visible"}) |
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,12 @@ | ||
// This test ensures that the "[src]" have the same font size as their headers | ||
// to avoid having some weird height difference in the background when the element | ||
// is selected. | ||
goto: file://|DOC_PATH|/test_docs/struct.Foo.html | ||
show-text: true | ||
// Check the impl headers. | ||
assert-css: (".impl.has-srclink .srclink", {"font-size": "17px"}, ALL) | ||
// The ".6" part is because the font-size is actually "1.1em". | ||
assert-css: (".impl.has-srclink .code-header.in-band", {"font-size": "17.6px"}, ALL) | ||
// Check the impl items. | ||
assert-css: (".impl-items .has-srclink .srclink", {"font-size": "16px"}, ALL) | ||
assert-css: (".impl-items .has-srclink .code-header", {"font-size": "16px"}, ALL) |
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,11 @@ | ||
#![deny(rustdoc::private_doc_tests)] | ||
|
||
mod foo { | ||
/// private doc test | ||
/// | ||
/// ``` | ||
/// assert!(false); | ||
/// ``` | ||
//~^^^^^ ERROR documentation test in private item | ||
pub fn bar() {} | ||
} |
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,18 @@ | ||
error: documentation test in private item | ||
--> $DIR/private-public-item-doc-test.rs:4:5 | ||
| | ||
LL | / /// private doc test | ||
LL | | /// | ||
LL | | /// ``` | ||
LL | | /// assert!(false); | ||
LL | | /// ``` | ||
| |___________^ | ||
| | ||
note: the lint level is defined here | ||
--> $DIR/private-public-item-doc-test.rs:1:9 | ||
| | ||
LL | #![deny(rustdoc::private_doc_tests)] | ||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ | ||
|
||
error: aborting due to previous error | ||
|
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,16 @@ | ||
// check-pass | ||
|
||
#![deny(rustdoc::private_doc_tests)] | ||
|
||
pub fn foo() {} | ||
|
||
mod private { | ||
/// re-exported doc test | ||
/// | ||
/// ``` | ||
/// assert!(true); | ||
/// ``` | ||
pub fn bar() {} | ||
} | ||
|
||
pub use private::bar; |
Oops, something went wrong.