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.
This commit is contained in:
Dylan DPC 2022-06-11 07:42:17 +02:00 committed by GitHub
commit 1f68d5f9e4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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.