From 3e3444a07f6a260870c060a2b7aab159d3ac94f8 Mon Sep 17 00:00:00 2001 From: Hosssein Date: Tue, 12 Dec 2023 18:37:08 +0330 Subject: [PATCH 1/2] Update address and title of github source of rust playground in playground.md --- src/meta/playground.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/meta/playground.md b/src/meta/playground.md index 6da4fdfdb2..c5a041a2af 100644 --- a/src/meta/playground.md +++ b/src/meta/playground.md @@ -42,11 +42,11 @@ Playground. This feature is enabled if you use the `#[doc]` attribute called ### See also: - [The Rust Playground][rust-playground] -- [rust-playground][rust-playground] +- [The Rust Playground On Github][rust-playground-github] - [The rustdoc Book][rustdoc-book] [rust-playground]: https://play.rust-lang.org/ -[rust-playground]: https://github.com/integer32llc/rust-playground/ +[rust-playground-github]: https://github.com/integer32llc/rust-playground/ [mdbook]: https://github.com/rust-lang/mdBook [official-rust-docs]: https://doc.rust-lang.org/core/ [rustdoc-book]: https://doc.rust-lang.org/rustdoc/what-is-rustdoc.html From 1eda4de4af95175a91c5a0730d473845e70243d7 Mon Sep 17 00:00:00 2001 From: Hosssein Date: Tue, 12 Dec 2023 18:50:30 +0330 Subject: [PATCH 2/2] Make an example using html_playground_url in playground.md --- src/meta/playground.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/meta/playground.md b/src/meta/playground.md index c5a041a2af..7d16cc5f2a 100644 --- a/src/meta/playground.md +++ b/src/meta/playground.md @@ -39,6 +39,13 @@ button that says "Run", which opens the code sample up in a new tab in Rust Playground. This feature is enabled if you use the `#[doc]` attribute called [`html_playground_url`][html-playground-url]. +``` +#![doc(html_playground_url = "https://play.rust-lang.org/")] +//! ``` +//! println!("Hello Wolrd"); +//! ``` +``` + ### See also: - [The Rust Playground][rust-playground]