forked from rust-lang/rust
-
Notifications
You must be signed in to change notification settings - Fork 6
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 rust-lang#121022 - fmease:rustdoc-x-crate-late-bound-lt…
…-src-order, r=<try> rustdoc: cross-crate re-exports: correctly render late-bound params in source order even if early-bound params are present r? ghost
- Loading branch information
Showing
9 changed files
with
76 additions
and
35 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
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
17 changes: 17 additions & 0 deletions
17
tests/rustdoc/inline_cross/auxiliary/early-late-bound-lifetime-params.rs
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,17 @@ | ||
// Here, `'a` and `'c` are late-bound and `'b`, `'d`, `T` and `N` are early-bound. | ||
|
||
pub fn f<'a, 'b, 'c, 'd, T, const N: usize>() | ||
where | ||
'b:, | ||
'd:, | ||
{} | ||
|
||
pub struct Ty; | ||
|
||
impl Ty { | ||
pub fn f<'a, 'b, 'c, 'd, T, const N: usize>() | ||
where | ||
'b:, | ||
'd:, | ||
{} | ||
} |
17 changes: 17 additions & 0 deletions
17
tests/rustdoc/inline_cross/early-late-bound-lifetime-params.rs
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,17 @@ | ||
// Check that we correctly render late-bound lifetime params in source order | ||
// even if early-bound generic params are present. | ||
// | ||
// For context, at the time of writing early- and late-bound params are stored | ||
// separately in rustc and therefore rustdoc needs to manually merge them. | ||
|
||
#![crate_name = "usr"] | ||
// aux-crate:dep=early-late-bound-lifetime-params.rs | ||
// edition:2021 | ||
|
||
// @has usr/fn.f.html | ||
// @has - '//pre[@class="rust item-decl"]' "fn f<'a, 'b, 'c, 'd, T, const N: usize>()" | ||
pub use dep::f; | ||
|
||
// @has usr/struct.Ty.html | ||
// @has - '//*[@id="method.f"]' "fn f<'a, 'b, 'c, 'd, T, const N: usize>()" | ||
pub use dep::Ty; |