diff options
| author | Dylan DPC <99973273+Dylan-DPC@users.noreply.github.com> | 2022-06-11 07:42:17 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-06-11 07:42:17 +0200 |
| commit | 1f68d5f9e4f17ba800bb89dfc068e8fe6d82d9e4 (patch) | |
| tree | 1b0c90e3ddf7f873fa91bdb05cdc87aa08b7be4b /src | |
| parent | dfbedf56929311bacd1b58d67eb3af63b8a26f49 (diff) | |
| parent | 74d210e32c1cd7074656e3c0214feb5f6bc6f1d3 (diff) | |
| download | rust-1f68d5f9e4f17ba800bb89dfc068e8fe6d82d9e4.tar.gz rust-1f68d5f9e4f17ba800bb89dfc068e8fe6d82d9e4.zip | |
Rollup merge of #97972 - hamza1311:patch-1, r=Dylan-DPC
Update #[doc(html_playground_url)] documentation to mention what the request will be The [documentation for `#![doc(html_playground_url = "_")]`](https://doc.rust-lang.org/rustdoc/write-documentation/the-doc-attribute.html#html_playground_url) specifies that a request will be made to the given URL but does specify what the contents of the request will be. This PR updates the documentation to include the query parameters through which the code is provided to the playground.
Diffstat (limited to 'src')
| -rw-r--r-- | src/doc/rustdoc/src/write-documentation/the-doc-attribute.md | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/doc/rustdoc/src/write-documentation/the-doc-attribute.md b/src/doc/rustdoc/src/write-documentation/the-doc-attribute.md index 25ef8b5bb91..e3b08648999 100644 --- a/src/doc/rustdoc/src/write-documentation/the-doc-attribute.md +++ b/src/doc/rustdoc/src/write-documentation/the-doc-attribute.md @@ -87,7 +87,9 @@ on your documentation examples make requests to. #![doc(html_playground_url = "https://playground.example.com/")] ``` -Now, when you press "run", the button will make a request to this domain. +Now, when you press "run", the button will make a request to this domain. The request +URL will contain 2 query parameters: `code` and `edition` for the code in the documentation +and the Rust edition respectively. If you don't use this attribute, there will be no run buttons. |
