diff options
| author | Michael Goulet <michael@errs.io> | 2024-07-11 19:49:51 -0400 |
|---|---|---|
| committer | Michael Goulet <michael@errs.io> | 2024-07-12 05:24:51 -0400 |
| commit | 843f5dd93b3edc65034eb8b9e16673c2bf8e28f2 (patch) | |
| tree | a5d6eff2dee4d2877d1a33ba0a7a1bedabbddf29 /tests/rustdoc/impl-trait-precise-capturing.rs | |
| parent | 5315cbe15b79533f380bbb6685aa5480d5ff4ef5 (diff) | |
| download | rust-843f5dd93b3edc65034eb8b9e16673c2bf8e28f2.tar.gz rust-843f5dd93b3edc65034eb8b9e16673c2bf8e28f2.zip | |
Add rustdoc support for use<> in (local) RPITs
Diffstat (limited to 'tests/rustdoc/impl-trait-precise-capturing.rs')
| -rw-r--r-- | tests/rustdoc/impl-trait-precise-capturing.rs | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/tests/rustdoc/impl-trait-precise-capturing.rs b/tests/rustdoc/impl-trait-precise-capturing.rs new file mode 100644 index 00000000000..d1987a555c1 --- /dev/null +++ b/tests/rustdoc/impl-trait-precise-capturing.rs @@ -0,0 +1,14 @@ +#![crate_name = "foo"] +#![feature(precise_capturing)] + +//@ has foo/fn.two.html '//section[@id="main-content"]//pre' "-> impl Sized + use<'b, 'a>" +pub fn two<'a, 'b, 'c>() -> impl Sized + use<'b, 'a /* no 'c */> {} + +//@ has foo/fn.params.html '//section[@id="main-content"]//pre' "-> impl Sized + use<'a, T, N>" +pub fn params<'a, T, const N: usize>() -> impl Sized + use<'a, T, N> {} + +//@ has foo/fn.none.html '//section[@id="main-content"]//pre' "-> impl Sized + use<>" +pub fn none() -> impl Sized + use<> {} + +//@ has foo/fn.first.html '//section[@id="main-content"]//pre' "-> impl use<> + Sized" +pub fn first() -> impl use<> + Sized {} |
