Skip to content

Commit 1f68d5f

Browse files
authored
Rollup merge of rust-lang#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.
2 parents dfbedf5 + 74d210e commit 1f68d5f

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/doc/rustdoc/src/write-documentation/the-doc-attribute.md

+3-1
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,9 @@ on your documentation examples make requests to.
8787
#![doc(html_playground_url = "https://playground.example.com/")]
8888
```
8989

90-
Now, when you press "run", the button will make a request to this domain.
90+
Now, when you press "run", the button will make a request to this domain. The request
91+
URL will contain 2 query parameters: `code` and `edition` for the code in the documentation
92+
and the Rust edition respectively.
9193

9294
If you don't use this attribute, there will be no run buttons.
9395

0 commit comments

Comments
 (0)