diff options
| author | León Orell Valerian Liehr <me@fmease.dev> | 2023-09-23 03:25:52 +0200 |
|---|---|---|
| committer | León Orell Valerian Liehr <me@fmease.dev> | 2023-09-25 15:57:04 +0200 |
| commit | 025a2cda0ec511b6bc66f02dcddc408bf386e7ec (patch) | |
| tree | dca59eec8719d8adb91df85fe225a78902a1beb7 /tests/rustdoc/inline_cross/auxiliary | |
| parent | e4a361a48a59ead52b302aaa2e1d9d345264935a (diff) | |
| download | rust-025a2cda0ec511b6bc66f02dcddc408bf386e7ec.tar.gz rust-025a2cda0ec511b6bc66f02dcddc408bf386e7ec.zip | |
rustdoc: correctly render ret ty of cross-crate async fns
Diffstat (limited to 'tests/rustdoc/inline_cross/auxiliary')
| -rw-r--r-- | tests/rustdoc/inline_cross/auxiliary/async-fn.rs | 18 | ||||
| -rw-r--r-- | tests/rustdoc/inline_cross/auxiliary/impl_trait_aux.rs | 6 |
2 files changed, 18 insertions, 6 deletions
diff --git a/tests/rustdoc/inline_cross/auxiliary/async-fn.rs b/tests/rustdoc/inline_cross/auxiliary/async-fn.rs new file mode 100644 index 00000000000..767564ed145 --- /dev/null +++ b/tests/rustdoc/inline_cross/auxiliary/async-fn.rs @@ -0,0 +1,18 @@ +#![feature(async_fn_in_trait)] +// edition: 2021 + +pub async fn load() -> i32 { + 0 +} + +pub trait Load { + async fn run(&self) -> i32; +} + +pub struct Loader; + +impl Load for Loader { + async fn run(&self) -> i32 { + 1 + } +} diff --git a/tests/rustdoc/inline_cross/auxiliary/impl_trait_aux.rs b/tests/rustdoc/inline_cross/auxiliary/impl_trait_aux.rs index 19433c9682b..42cfc3dc319 100644 --- a/tests/rustdoc/inline_cross/auxiliary/impl_trait_aux.rs +++ b/tests/rustdoc/inline_cross/auxiliary/impl_trait_aux.rs @@ -33,9 +33,3 @@ pub struct Foo; impl Foo { pub fn method<'a>(_x: impl Clone + Into<Vec<u8>> + 'a) {} } - -pub struct Bar; - -impl Bar { - pub async fn async_foo(&self) {} -} |
