forked from rust-lang/rust
-
Notifications
You must be signed in to change notification settings - Fork 7
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#121022 - fmease:rustdoc-x-crate-late-bound-lt-src-order, r=GuillaumeGomez 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
7 changed files
with
119 additions
and
70 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
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>(_: impl Copy) | ||
where | ||
'b:, | ||
'd:, | ||
{} | ||
|
||
pub struct Ty; | ||
|
||
impl Ty { | ||
pub fn f<'a, 'b, 'c, 'd, T, const N: usize>(_: impl Copy) | ||
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>(_: impl Copy)" | ||
pub use dep::f; | ||
|
||
// @has usr/struct.Ty.html | ||
// @has - '//*[@id="method.f"]' "fn f<'a, 'b, 'c, 'd, T, const N: usize>(_: impl Copy)" | ||
pub use dep::Ty; |