From 2147a069fffa320c0148c7671044ebd6f7af9528 Mon Sep 17 00:00:00 2001 From: Muhammad Hamza Date: Sat, 11 Jun 2022 02:03:33 +0500 Subject: [PATCH 1/2] Update the-doc-attribute.md --- src/doc/rustdoc/src/write-documentation/the-doc-attribute.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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 25ef8b5bb9141..de604ff0fde73 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. From 74d210e32c1cd7074656e3c0214feb5f6bc6f1d3 Mon Sep 17 00:00:00 2001 From: Muhammad Hamza Date: Sat, 11 Jun 2022 03:10:29 +0500 Subject: [PATCH 2/2] Update the-doc-attribute.md --- src/doc/rustdoc/src/write-documentation/the-doc-attribute.md | 4 ++-- 1 file changed, 2 insertions(+), 2 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 de604ff0fde73..e3b0864899980 100644 --- a/src/doc/rustdoc/src/write-documentation/the-doc-attribute.md +++ b/src/doc/rustdoc/src/write-documentation/the-doc-attribute.md @@ -87,9 +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. The request +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. +and the Rust edition respectively. If you don't use this attribute, there will be no run buttons.